PatientLevelPrediction
PatientLevelPrediction copied to clipboard
Add code to create plpModel for an existing GLM
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
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
I'm going to make a PR to move this function from the validation module to the package