OHDSI Home | Forums | Wiki | Github

Model external validaton

I am now conducting research using [PatientLevelPrediction] package.
I made my prediction model, and to externally validate the model, I am following the instructions of “Book of ohdsi”, which I attatched above.
As written in the book, I loaded my plpmodel, plpdata, and create new study population, but the “applyModel” function is no longer available in patientLevelPrediction package.
Can anyone can tell me which function I have to use to externally validate my model?

Thank you very much.

there is a function externalValidatePlp for the validation with other databases. Maybe this is what you are looking for.


Thank you for your quick reply.

I tried the code you recommended, but it does not work.
I also used externalValidateDbPlp, but it is also not working

Error code was as above.

I also tried with package-included externalValidateDbPlp code, but it wasn’s work neither.

If you know, can you tell m how to solve this problem?

Thank you very much.

For the first error (‘ckeckInClass’) you have to load this function prior to executing externalValidateDbPlp. This function is in the PatientLevelPrediction package, however, it seems that is not exported through the package. I think it will work normally after sourcing this script.

It worked, after applying the function you told me. Thanks very much!
but another problems comes out again. :disappointed_relieved:

Some results comes out, but I couldn’t get model performance evaluation results.

Can you tell me how can i solve this problem??

Sorry for keep bothering you.

Thank you very much


I solved the problem.

I guess the problem was the difference in package versions.

I used old plp package, and the problem solved.

Thank you so much for all your great help.

Best regards,