pw_exp_impute: Imputes time-to-event outcomes.

Description Usage Arguments Value Examples

View source: R/pw_exp.R

Description

Imputation of time-to-event outcomes using the piecewise constant hazard exponential function.

Usage

1
pw_exp_impute(time, hazard, maxtime = NULL, cutpoint = NULL)

Arguments

time

vector. The observed time for patient that have had no event or passed maxtime.

hazard

vector. The constant hazard rates for exponential failures.

maxtime

scalar. maximum time before end of study.

cutpoint

vector. The change-point vector indicating time when the hazard rates change.

Value

a dataset with simulated follow-up time (time) and respective event indicator (1 = event, 0 = censoring)

Examples

1
2
3
pw_exp_impute(time = c(120), c(0.005, 0.001), 110, 40)
          pw_exp_impute(time = c(10, 20, 30), c(0.005, 0.01, 0.02), 100, c(40, 80))
          pw_exp_impute(time = c(40, 30), c(0.005, 0.01), 120, c(50))

bayesCT documentation built on July 2, 2020, 2:34 a.m.