[R] MSM package and qmatrix

Ross Culloch ross.culloch at dur.ac.uk
Mon Aug 3 21:17:19 CEST 2009


Hi R-helpers,

I am having a problem understanding how to construct the qmatrix, i have
read the help menu for msm but I am still a bit lost. Below is an example of
one of my transition matrices:

statetable.msm(BEH, ID, data = A1)

     to
from   1  2  3  4  5 23 200 201 203 999
  1   86 11  2 20  1  9   3  11   1  22
  2   18  4  4  4  0  1   1   1   0   1
  3    5  2  0  5  0  0   2   0   0   3
  4   17  5  5 13  0  4   3   3   0   7
  5    1  0  1  1  0  0   0   0   0   0
  23   7  3  0  4  0  3   1   3   0   3
  200  5  0  2  3  1  2   1   3   0   3
  201  5  5  3  2  1  0   2   6   1   5
  203  3  0  0  0  0  0   0   0   0   0
  999 18  4  0  5  0  5   7   3   1   0


Instantaneous transition IS allowed from state r to state s. But what i
don't understand is what is the logical way to create the initial transition
matrix - i've tried to just give even numbers to all transition
possibilities e.g. every transition given 0.1 or 1, but i get the following
error message:

 Error in msm.check.state(nrow(qmatrix), state, cens$censor) : 
  State vector contains elements not in 1, 2, ... , 10

Does anyone have any suggestions, i can only assume that this is a simple
problem that i have overlooked because nobody else seems to have asked it!

Any suggestions on how to construct a qmatrix would be much appreciated,

Berst wishes,

Ross
-- 
View this message in context: http://www.nabble.com/MSM-package-and-qmatrix-tp24796485p24796485.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list