OHDSI / PatientLevelPrediction

An R package for performing patient level prediction in an observational database in the OMOP Common Data Model.
https://ohdsi.github.io/PatientLevelPrediction
181 stars 88 forks source link

Fix cohort covariates and add predictGlm to package #465

Open egillax opened 1 week ago

egillax commented 1 week ago

Necessary for upcoming study.

When specifying the cohort covariateSettings previously you needed to specify the cohortTable and workSchema. But when running studies using strategus all settings are pre-specified and cohorts generated with CohortGenerator. I added the option of not specifying cohortTable and schema in createCohortCovariateSettings . Then at runtime it will look in the grandparent environment using parent.frame() for those variables in the databaseDetails.

I also moved predictGlm from the validation module to here and created a convenience function to create a model to be used by that function.