View source: R/impute_censored.R
impute_censored | R Documentation |
Impute left-censored observations via posterior prediction.
impute_censored(x, input, yvar, ycens, predvar = ".prediction")
x |
A dataframe of observations and posterior predictions. |
input |
The input dataframe used to generate the model. |
yvar |
Name of the column containing left-censored observations. |
ycens |
Name of the column containing the censoring indicator. |
predvar |
Name of prediction column for imputing censored observations. |
A dataframe containing the (possibly imputed) observations.
x <- data.frame(
x = 1:10,
y = rnorm(10),
.prediction = rnorm(10),
cens = "left"
)
impute_censored(x, x, "y", "cens")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.