I have children with typical reading skills (TD), reading difficulties (RD), spelling difficulties (SD), and reading and spelling difficulties (RSD) from two countries followed over time. I have three variables. One is the nominal variable country (US=2 and SWE=4). I also have two categorical variables where G1_20_RSD (time 1) have four categories (TD=0, RD=1, SD=2, RSD=3) and G2_20_RSD (time 2) have five (TD=0, RD=1, SD=2, RSD=3, NA=4, not applicable to the inclusion criteria). I want to investigate the transition over time from G1_20_RSD to G2_20_RSD across countries. That is, how many stayed in the same group, and how many moved to different groups across time. I want one plot for US and one for Sweden. I have tried different script but I am not able to get a proper one. I think the script introduced on this page are interesting, but I am not able to adapt it to my data. https://cran.r-project.org/web/packages/Gmisc/vignettes/transitionPlot.html
I have tried different script but I am not able to get a proper one.