impute: Impute Censored Values

View source: R/imputeCensored.R

imputeR Documentation

Impute Censored Values

Description

Impute value for multiply censored data.

Usage

impute(x, imputeOption = "mid")

Arguments

x

vector of type survival::Surv

imputeOption

imputation method [default= "mid"], valid impute options are "lower", "upper", "mid", "norm", "lnorm"

Details

The imputeOption values of "lower", "upper" and "mid" impute the lower limit, upper limit, and midpoint between the lower and upper limit. In the context of typical water quality data, these options would be equivalent to zero, detection limit and 1/2 detection limit substitution. Options for substituting the normal ["norm"] or lognormal ["lnorm"] expectation can also be used.

Value

vector where x is transformed into a simple numeric variable

See Also

makeSurvDF, unSurvDF , unSurv, imputeDF, imputeDF,

Examples

## Not run: 
x  <- dataCensored[1:20,"tdp"]
x.lower <- impute(x,'lower')
x.mid   <- impute(x,'mid')
x.upper <- impute(x,'upper')
x.norm  <- impute(x,'norm')
x.lnorm <- impute(x,'lnorm')

## End(Not run)

leppott/baytrends documentation built on Nov. 2, 2024, 6:42 p.m.