powered by
Prepare data to be passed to clos() in package etm.
prepare.los.data(x)
a data.frame of the form data.frame(id, from, to, time, oid):
id (patient id, admision id)
the state from where a transition occurs
the state to which a transition occurs
time of the transition
the observation id
data.frame of the form data.frame(id, j.01, j.02, j.03, j.12, j.13, cens):
observed time for jump from 0 to 1
observed time for jump from 0 to 2
observed time for jump from 0 to 3
observed time for jump from 1 to 2
observed time for jump from 1 to 3
censoring time (either in initial or intermediate state)
Matthias Wangler
clos
data(los.data) my.observ <- prepare.los.data(x=los.data)
Run the code above in your browser using DataLab