PatientLevelPrediction icon indicating copy to clipboard operation
PatientLevelPrediction copied to clipboard

Add code to create plpModel for an existing GLM

Open jreps opened this issue 2 years ago • 2 comments

The PLP validation skeleton contains code to create a plpModel version of any GLM that has been developed outside of PatientLevelPrediction (see https://github.com/OHDSI/SkeletonPredictionValidationStudy/blob/main/extras/addModel.R )

  • This should be added to PatientLevelPrediction (or some package that extends PatientLevelPrediction)
  • My thoughts for adding it to PatientLevelPrediction is to make maintaining the function easier and it seems like something that will be commonly needed (for benchmarking).

Then users can easy validate models that have been developed outside of PatientLevelPrediction

We could call the function createPreviouslyDevelopedModel() ? It would take as input the model design settings and settings to make the plpModel$model object. It should work with the validation functions externalValidatePlp() and externalValidateDbPlp() and also be saveable/loadable via savePlpModel() and loadPlpModel() .

It would be great to also enable non-GLM developed outside of PatientLevelPrediction to be translated into plpModel format for PatientLevelPrediction - but I'll leave this for the future

jreps avatar Sep 09 '22 15:09 jreps

For now I have added this in the validation module: https://github.com/OHDSI/PatientLevelPredictionValidationModule/blob/main/Main.R but we may want to move into PLP for testing in the future

jreps avatar Apr 26 '23 13:04 jreps

I'm going to make a PR to move this function from the validation module to the package

egillax avatar Jun 26 '24 14:06 egillax