Description Usage Arguments Details
View source: R/main_functions.R
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.
1 | impute.time(dat, event.distribution, time, type = "I", n.dec = 2)
|
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. |
The output is a vector of predicted event times for the appropriate subjects.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.