View source: R/user_utilities.R
imputeCens | R Documentation |
Imputes censored responses from data.
imputeCens(fit, newdata = NULL, imputeType = "fullSample", samples = 5)
fit |
icenReg model fit |
newdata |
|
imputeType |
type of imputation. See details for options |
samples |
Number of imputations (ignored if |
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.
Clifford Anderson-Bergman
simdata <- simIC_weib(n = 500)
fit <- ic_par(cbind(l, u) ~ x1 + x2,
data = simdata)
imputedValues <- imputeCens(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.