[R] msm and pmatrix

2009-09-28 Thread Peter Adamson
Dear All, I’m using R package ‘msm’ to fit a multi state model to infection history data (counts of infections per month upto diagnosis of a particular disease (sink state is state 11). The observed transitions are as follows: to from 1 2 3 4 5 6 7 810

Re: [R] MSM package and qmatrix

2009-08-25 Thread Peter Adamson
Hi Ross, For an eleven state model you could define transitions as follows: transitions_allowed <- matrix(c( 0,1,1,1,1,1,1,1,1,1,1, 1,0,1,1,1,1,1,1,1,1,1, 1,1,0,1,1,1,1,1,1,1,1, 1,1,1,0,1,1,1,