Open malihamashkoor123 opened 3 months ago
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 cs
and cohort_covariates
.
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 v6.3.8
of PLP and FeatureExtraction
v3.5.2
or v3.6.0
it seems to work for me. But the minCharacterizationMean
parameter was new in FeatureExtraction
v3.5.0
which the error is pointing at.
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 traceback()
and share the output here, that way I get more info about the error. Could you also share how you're calling getPlpData
just to make sure everything's good there.
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:
Hi @malihamashkoor123,
I don't see any error? Seems to be hanging after Fetching data took ...
line. Is that correct? It hangs for very long and then you stop it?
The tasks your analysis should be doing after that are cleaning sql temporary tables and moving on to construct the cohort_covariates
. Unfortunately we are not printing the progress well during that step.
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:
cohort_covariates[[length(cohort_covariates)+1]] <- cs cohort_covariates[[length(cohort_covariates)+1]] <- looCovSet
then
data <- PatientLevelPrediction::getPlpData( covariateSettings = cohort_covariates, ...)
@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: