loadPlpModel {PatientLevelPrediction} | R Documentation |
loads the plp model
Description
loads the plp model
Usage
loadPlpModel(dirPath)
Arguments
dirPath |
The location of the model |
Details
Loads a plp model that was saved using savePlpModel()
Value
The plpModel object
Examples
data("simulationProfile")
plpData <- simulatePlpData(simulationProfile, n = 1000)
saveLoc <- file.path(tempdir(), "loadPlpModel")
plpResult <- runPlp(plpData, outcomeId = 3, saveDirectory = saveLoc)
savePlpModel(plpResult$model, file.path(saveLoc, "savedModel"))
loadedModel <- loadPlpModel(file.path(saveLoc, "savedModel"))
# show design of loaded model
str(loadedModel$modelDesign)
# clean up
unlink(saveLoc, recursive = TRUE)
[Package PatientLevelPrediction version 6.4.1 Index]