imputeCens: Impute Interval Censored Data from icenReg Regression Model

Description Usage Arguments Details Author(s) Examples

View source: R/user_utilities.R

Description

Imputes censored responses from data.

Usage

1
2
imputeCens(fit, newdata = NULL, imputeType = "fullSample",
  samples = 5)

Arguments

fit

icenReg model fit

newdata

data.frame containing covariates and censored intervals. If blank, will use data from model

imputeType

type of imputation. See details for options

samples

Number of imputations (ignored if imputeType = "median")

Details

If newdata is left blank, will provide estimates for original data set.

There are several options for how to impute. imputeType = 'median' imputes the median time, conditional on the response interval, covariates and regression parameters at the MLE. To get random imputations without accounting for error in the estimated parameters imputeType ='fixedParSample' takes a random sample of the response variable, conditional on the response interval, covariates and estimated parameters at the MLE. Finally, imputeType = 'fullSample' first takes a random sample of the coefficients, (assuming asymptotic normality) and then takes a random sample of the response variable, conditional on the response interval, covariates, and the random sample of the coefficients.

Author(s)

Clifford Anderson-Bergman

Examples

1
2
3
4
5
6
simdata <- simIC_weib(n = 500)

fit <- ic_par(cbind(l, u) ~ x1 + x2,
              data = simdata)

imputedValues <- imputeCens(fit)

Example output

Loading required package: survival
Loading required package: Rcpp
Loading required package: coda

icenReg documentation built on Oct. 23, 2020, 8:11 p.m.