predictGlm | R Documentation |
Predict risk with a given plpModel containing a generalized linear model.
predictGlm(plpModel, data, cohort)
plpModel |
An object of type |
data |
An object of type |
cohort |
The population dataframe created using
|
A dataframe containing the prediction for each person in the population
coefficients <- data.frame(
covariateId = c(1002),
coefficient = c(0.05))
model <- createGlmModel(coefficients, intercept = -2.5)
data("simulationProfile")
plpData <- simulatePlpData(simulationProfile, n=50)
prediction <- predictGlm(model, plpData, plpData$cohorts)
# see the predicted risk values
head(prediction)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.