50% off: Unlimited data and AI learning.
State of Data and AI Literacy Report 2025

icenReg (version 1.3.5)

predict.icenReg_fit: Predictions from icenReg Regression Model

Description

Gets various estimates from a ic_par or ic_sp object.

Usage

"predict"(object, type = "response", newdata = NULL, ...)

Arguments

object
model fit with ic_par or ic_sp
type
type of prediction. Options include "lp", "response"
newdata
data.frame containing covariates
...
other arguments (will be ignored)

Details

If newdata is left blank, will provide estimates for original data set. For the argument type, there are two options. "lp" provides the linear predictor for each subject (i.e. in a proportional hazards model, this is the log-hazards ratio, in proportional odds, the log proporitonal odds), "response" provides the median response value for each subject, *conditional on that subject's covariates, but ignoring their actual response interval*. Use imputeCens to impute the censored values.

Examples

Run this code

simdata <- simIC_weib(n = 500, b1 = .3, b2 = -.3,
                      inspections = 6,
                      inspectLength = 1)
  
fit <- ic_par(cbind(l, u) ~ x1 + x2,
                   data = simdata)

imputedValues <- predict(fit)

Run the code above in your browser using DataLab