impute_censored: Impute left-censored observations via posterior prediction.

View source: R/impute_censored.R

impute_censoredR Documentation

Impute left-censored observations via posterior prediction.

Description

Impute left-censored observations via posterior prediction.

Usage

impute_censored(x, input, yvar, ycens, predvar = ".prediction")

Arguments

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.

Value

A dataframe containing the (possibly imputed) observations.

Examples

x <- data.frame(
   x = 1:10,
   y = rnorm(10),
   .prediction = rnorm(10),
   cens = "left"
)
impute_censored(x, x, "y", "cens")

bentrueman/bgamcar1 documentation built on July 6, 2024, 11:16 p.m.