Learn R Programming

blm (version 2022.0.0.1)

predict: Get risk predictions for blm and lexpit objects.

Description

Computes vector of risk predictions for the dataset used to fit the model. As with method predict.glm, standard errors for fitted values can be requested and predictions for the covariates of the data frame newdata can be computed rather than the default computation of all fitted values for the data frame used for model fitting.

Arguments

Methods

predict

signature(object = "blm", newdata, se = FALSE): Risk predictions for fit design matrix.

predict

signature(object = "lexpit", newdata, se = FALSE): Risk predictions for fit design matrix.

Author

Stephanie Kovalchik s.a.kovalchik@gmail.com

Examples

Run this code

data(ccdata)

fit <- lexpit(y~female, y~packyear, data = ccdata,
       			weight = ccdata$w, strata = ccdata$strata)

predict(fit)[1:10]

Run the code above in your browser using DataLab