Skip to content
Prev 257393 / 398506 Next

Markov transition matrices , missing transitions for certain years

To keep the table dimensions the same, try changing the columns to factors...


boxes$y97<-factor(boxes$y97, 1:4)
boxes$y98<-factor(boxes$y98, 1:4)
boxes$y99<-factor(boxes$y99, 1:4)
...
1 2 3 4
  1 1 0 1 0
  2 0 0 0 0
  3 0 0 0 0
  4 1 0 0 1
1 2 3 4
  1 1 0 0 1
  2 0 0 0 0
  3 0 0 0 0
  4 1 0 0 1

Chris
Abby_UNR wrote:
--
View this message in context: http://r.789695.n4.nabble.com/Markov-transition-matrices-missing-transitions-for-certain-years-tp3459072p3460651.html
Sent from the R help mailing list archive at Nabble.com.