predictCyclops {PatientLevelPrediction} | R Documentation |
Create predictive probabilities
Description
Create predictive probabilities
Usage
predictCyclops(plpModel, data, cohort)
Arguments
plpModel |
An object of type |
data |
The new plpData containing the covariateData for the new population |
cohort |
The cohort to calculate the prediction for |
Details
Generates predictions for the population specified in plpData given the model.
Value
The value column in the result data.frame is: logistic: probabilities of the outcome, poisson: Poisson rate (per day) of the outome, survival: hazard rate (per day) of the outcome.
Examples
data("simulationProfile")
plpData <- simulatePlpData(simulationProfile, n = 1000)
population <- createStudyPopulation(plpData, outcomeId = 3)
data <- splitData(plpData, population)
plpModel <- fitPlp(data$Train, modelSettings = setLassoLogisticRegression(),
analysisId = "test", analysisPath = NULL)
prediction <- predictCyclops(plpModel, data$Test, data$Test$labels)
# view prediction dataframe
head(prediction)
[Package PatientLevelPrediction version 6.4.1 Index]