trans {changeLOS}R Documentation

transition matrices

Description

computes the Aalen-Johansen estimator for the matrix of transition probabilities P(u-, u) for all observed transition times u. The entry (l,m) of the matrix denotes the estimated probability that state m has been reached by time u given state l has been occupied just before time u.

Usage

trans(model, observ)

Arguments

model an object of the class 'msmodel' which describes the multi-state model
observ a data.frame of the form data.frame( id, from, to, time, oid ) (see also prepare.los.data):
id
id (patient id, admision id)
from
the state from where a transition occurs
to
the state to which a transition occurs
time
the time a transition occurs
oid
the observation id

Details

The estimator for P(u-, u) is described by Andersen et al. (1993) at the bottom of p. 288. Non-diagonal entries (h, j) are given as the number of observed transitions from stateh to state j, divided by the number of individuals in state h just prior to time u. The diagonal elements are chosen such that the sum of each row equals 1.

The Aalen-Johansen estimator for P(s, t) can then be computed as matrix product of all matrices P(u-, u) for all transition times u in (s,t], see aj.

Value

An object of the class 'trans'. The object is a list of:

matrices array of matrices P(u-, u) for every transition time u
times the transition times
nrtransitions a matrix with
column 1
the state from where a transition occurs
column 2
the state to which a transition occurs
column 3
the number of transitions
state.names vector with the names of the states
nr.before matrix with the number in each state just before the transition times

Author(s)

Matthias Wangler mw@imbi.uni-freiburg.de

References

P Andersen, O Borgan, R Gill, and N Keiding (1993). Statistical models based on counting processes. New York: Springer

S Datta, and G Satten (2001). Validity of the Aalen-Johansen estimators of stage occupation probabilities and Nelson-Aalen estimators of integrated transition hazards for non-Markov models. Statistics and Probability Letters 55 (4), 403–411.

Andersen and Keiding (2002). Multi-state models for event history analysis. Statistical Methods in Medical Research 11 (2), 91–115.

See Also

msmodel, clos, aj

Examples

data(los.data)
my.observ <- prepare.los.data(x=los.data)
my.model <- msmodel(c("0","1","2","3"),cens.name="cens")
my.trans <- trans(model=my.model,observ=my.observ)
my.matrices <- my.trans$matrices
my.times <- my.trans$times

[Package changeLOS version 2.0.9-2 Index]