-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when using estimatePeriodPrevalence #2
Comments
Hi @rfherrerac, could you try updating CDMConnector to the latest cran version? |
Thanks @edward-burn. I did it. Now the error changed to: My reference cohort is defined as: |
Hmmm sorry about that uninformative error message @rfherrerac. I think it is indicating that it is not finding any full years to estimate period prevalence for (as you have the requirement completeDatabaseIntervals =TRUE). What is your earliest observation period start date and latest observation period end date in your database? |
thanks for seeing this. I was checking and in the getPrevalence.R line 74, when doing start datestart <- studyPop %>% |
Hmm that's odd, what database management system are you using? |
redshift |
Thanks @rfherrerac, looking into this there was a slight change in behaviour since dplyr v1.1 that has caused this problem for redshift. I'm going to do a quick update and release of IncidencePrevalence with a fix for this (I have a fix working locally, but just need to go through a few steps to get the release out). |
Super! thanks a lot. |
@rfherrerac could you please try with the latest version here on github? |
Perfect! Worked. Thanks a lot! |
1 similar comment
Perfect! Worked. Thanks a lot! |
Describe the bug
I created my cohorts as mentioned in the package. When using the function estimatePeriodPrevalence
prev <- estimatePeriodPrevalence(cdm = cdm,
denominatorTable = "denominatorfull",
outcomeTable = "outcome",
interval = "years",
fullContribution = FALSE,
completeDatabaseIntervals =TRUE,
outcomeLookbackDays = NULL)
I am getting this error
Error in UseMethod("cohortCount") :
no applicable method for 'cohortCount' applied to an object of class "cdm_reference"
R version 4.2.3 (2023-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux 8.7 (Ootpa)
other attached packages:
[1] IncidencePrevalence_0.4.1 dbplyr_2.3.2
[3] dplyr_1.1.2 DatabaseConnector_6.1.0
[5] RPostgres_1.4.5 CDMConnector_0.5.1
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: