0
data=data.frame("id"=c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4),
                "grade"=c(11,11,12,13,11,12,12,11,13,14,NA,NA,12,11,13,14),
                "age"=c(20,21,22,23,26,27,28,29,19,20,NA,NA,22,23,24,25))

We have data on when student go from one grade to another and want to estimate age-based transition probability from grades using longitudinal data. This is a puzzle to me. It is like markov but we want to use as much base R as can be done using multinomial models. The output ideal is transition matrix shown by age.

iod
  • 7,412
  • 2
  • 17
  • 36
bvowe
  • 3,004
  • 3
  • 16
  • 33
  • id 4 starts at grade 12 at age 22, then 11 at age 23 and back to 13 at age 24. Is that a typo? – iod Apr 18 '19 at 17:13
  • @iod not typo just example of how this data looks since i am unable to share student data so i make a fake data – bvowe Apr 18 '19 at 17:19

0 Answers0