trans               package:changeLOS               R Documentation

_t_r_a_n_s_i_t_i_o_n _m_a_t_r_i_c_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     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.

_U_s_a_g_e:

     trans(model, observ)

_A_r_g_u_m_e_n_t_s:

   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'):

          _i_d id (patient id, admision id)

          _f_r_o_m the state from where a transition occurs

          _t_o the state to which a transition occurs

          _t_i_m_e the time a transition occurs

          _o_i_d the observation id          

_D_e_t_a_i_l_s:

     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'.

_V_a_l_u_e:

     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

          _c_o_l_u_m_n _1 the state from where a transition occurs

          _c_o_l_u_m_n _2 the state to which a transition occurs

          _c_o_l_u_m_n _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

_A_u_t_h_o_r(_s):

     Matthias Wangler mw@imbi.uni-freiburg.de

_R_e_f_e_r_e_n_c_e_s:

     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.

_S_e_e _A_l_s_o:

     'msmodel, clos, aj'

_E_x_a_m_p_l_e_s:

     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

