recur.pre.bart: Data construction for nonparametric survival analysis with...

Description Usage Arguments Value Author(s) See Also Examples

Description

Recurrent event data contained in (t_1,δ_1, ..., t_k,δ_k, x) must be translated to data suitable for the BART model; see recur.bart for more details.

Usage

1
recur.pre.bart( times, delta, x.train=NULL, probs=c(0.15, 0.15), baseline=FALSE )

Arguments

times

Matrix of time to event or right-censoring.

delta

Matrix of event indicators: 1 is an event while 0 is censored.

x.train

Explanatory variables for training (in sample) data.
If provided, must be a matrix with (as usual) rows corresponding to observations and columns to variables.

probs

X.test is generated from x.train in a similar fashion to X.train. However, observations beyond censoring contain NA for columns two and three containing v(t) and N(t-) respectively. In order to preform prediction with X.test, then these missing values need to be handled accordingly. We provide an automated method for this which is returned as X.base. It would be difficult to provide an efficient method that randomly generates v(t) and N(t-) since they are structurally dependent. Rather, we deterministically generate them in such a fashion that they define a "middle" baseline, i.e. the median N(t-) as a function of t for non-censored subjects (calculated from X.train); the median is adjusted upward as the censoring increases with time (if it does at all) to a maximum value controlled by the second argument contained in probs since otherwise the "low" risk subjects would be over-represented. Each subject's previous value is carried forward unless their computed sojourn time (which is a function of the generated N(t-)) is longer than the the median v(t) as a function of t (which is also calculated from X.train); the median is adjusted downward as the censoring increases with time (if it does at all) to a maximum value controlled by the first argument contained in probs.

baseline

workaround bug

Value

recur.pre.bart returns a list. Besides the items listed below, the list has a times component giving the unique times and K which is the number of unique times.

y.train

A vector of binary responses.

X.train

A matrix with the rows of the training data.

X.test

Generated from x.train (see discussion above included in the argument probs).

X.base

Generated from x.train (see discussion above included in the argument probs).

sojourn

Generated from x.train (see discussion above included in the argument probs).

pattern

Generated from x.train (see discussion above included in the argument probs).

Author(s)

Rodney Sparapani: rsparapa@mcw.edu

See Also

recur.bart

Examples

1
2
3
4
5
6
## Not run: 
require(timebart)



## End(Not run)

timebart documentation built on May 2, 2019, 4:43 p.m.