trans {changeLOS} | R Documentation |
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.
trans(model, observ)
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 ):
|
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
.
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
|
state.names |
vector with the names of the states |
nr.before |
matrix with the number in each state just before the transition times |
Matthias Wangler mw@imbi.uni-freiburg.de
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.
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