-
Notifications
You must be signed in to change notification settings - Fork 88
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 in obtaining the PlpData with the getPlpData() function: #463
Comments
The error you're encountering was fixed in v6.3.7 of PLP. It seems you're using v6.3.6. I suggest you update to the latest version (v6.3.8) with: remotes::install_github("OHDSI/PatientLevelPrediction") I'm not sure about the hang. From your description I'm missing how you create |
Hi @egillax , I have updated the PLP package to the latest version (V6.3.8). However I still get the following error when I execute the getPlpData() function: My session info is as follow: Additionally, I am creating the cohort covariates by using the createCohortBasedCovariateSettings() in the following way: |
Hi @malihamashkoor123 , I'm struggling a bit to reproduce it. Using Could you restart your rsession and rerun the code to make sure R is using the correct package versions (nothing old lingering in your workspace). If you encounter the error again could you run |
Hi @egillax , I have restarted the system, the error with the minCharacterizationMean is resolved now. However, I am still unable to fully execute the getPlpData() function. The code is hanging, I have attached herewith a screenshot to show that and also how the getPlpData() function is called: The output of traceback() is as follow: The list of covariates are provided in the following way: The ‘cs’ variable is obtained from the createCovariateSettings() function. ‘cohort_covariates’ is obtained in the following way: And custom covariates (‘looCovSet’) is obtained by using the createLooCovariateSettings(). My session Info is as follow: |
I don't see any error? Seems to be hanging after The tasks your analysis should be doing after that are cleaning sql temporary tables and moving on to construct the I've made a version with debug printing. If you install it with: remotes::install_github("OHDSI/PatientLevelPrediction@logs_cohort_covs") Then restart your R session. Rerun the analysis and share what's printed to the R console with me. That way I can see exactly in what step the hang is happening in. |
I wonder whether the issue is the way you are combining the covariateSettings. The cohort_covariates is a list and then you create a list with the standard covariates, the list of cohort covariates and the loo covariates, so I don't think you have a list of covariate settings, you have a list with two settings and a list of settings. Try this: add cs, looCovSet to listcohort_covariates[[length(cohort_covariates)+1]] <- cs then data <- PatientLevelPrediction::getPlpData( @egillax - we should probs have a check in the package for the covariateSetting to make sure it is a covariateSetting object or a list of covariateSettings. Then we can print out the issue if the covariateSettings is in the wrong format. I'll add this as an issue. |
thanks ! @jreps That's exactly the issue. I managed to reproduce it. |
I am trying to obtain the cohort covariates with the createCohortCovariateSettings() function from the PatientLevelPrediction package. However, I am running into the following error when I execute the getPlpData() function:
The code that I am using to obtain the plpData is as follow:
I am supplying the covaraiteSettings as a list of default covariates and cohort covariates obtained by the functions createCovariateSettings() and createCohortCovariateSettings(), in the following way:
Additionally, on the other hand if I provide the covaraiteSettings in the following way:
Then the code is hanging:
Can you pls let me know how can I resolve the above errors and how should I provide the covaraiteSettings object so that I am able to execute my code and obtain the PlpData object?
My session info is as follow:
The text was updated successfully, but these errors were encountered: