impute.time: Imputation of Event Time

Description Usage Arguments Details

View source: R/main_functions.R

Description

Given a data frame or matrix of subject event intervals, this function imputes an estimate of the exact onset time as the expectation given an assumed time-to-event distribution.

Usage

1
impute.time(dat, event.distribution, time, type = "I", n.dec = 2)

Arguments

dat

A data.frame or matrix where rows are subjects and columns are left and right interval bounds.

event.distribution

A vector of event probabilities, e.g. the TB.o.smooth.logNe vector output from running the smoothTB function.

time

A vector of event times corresponding to the probabilities in the event.distribution variable, e.g. the time.o vector output from running the smoothTB function.

type

The type of observation(s) you would like to predict. Mutually exclusive options are "LI" (left- and interval-censored observations), "I" (interval-censored observations), "LIR" (left-, interval-, and right- censored observations). Default is "I". Note that depending on the underlying event mechanism, it may be inappropriate to attempt imputation for left- or right-censored subjects.

n.dec

The number of decimal places in the observed data.

Details

The output is a vector of predicted event times for the appropriate subjects.


tubbsjd/SISE documentation built on Dec. 23, 2021, 1:01 p.m.