! F.V. Rijsdijk ! Polychoric Cor Script for CTables, of categorical variables (twin1/twin2) ! Note: the threshold model is different then when using RAW ORD: ! TWIN 2 ! ! 0 1 2 ! T 0 cell1 | cell2 | cell3 ! W ___________________________ row threshold 1 ! I 1 cell4 | cell5 | cell6 ! N ____________________________ row threshold 2 ! 1 2 cell7 | cell8 | cell9 ! ^ ^ ! col thr 1 col thr2 ! THRESHOLD MODEL : ! (1,1) (1,2) = row thresholds = TH of twin1 =T ! (2,1) (2,2) = col thresholds = TH of twin2 =U ! So, need to do T_U #ngroups 2 G1: Correlation matrix for MZ pairs Data NInputv=2 CTable 3 3 385 23 6 28 37 4 3 3 12 Begin Matrices; R STAN 2 2 FREE ! MZ cor T FUL 1 2 FREE ! TH of twin1 U FUL 1 2 FREE ! TH of twin2 End matrices; COvariance R/ !Model for the MZ correlation Thresholds T_U / !Model for the thresholds MA T 1.8 2.4 !starting values for the Twin 1 thresholds MA U 1.8 2.4 !starting values for the Twin 2 thresholds MA R .6 !starting value Cor Interval R 2 1 options RS end G2: Correlation matrix DZ Data NInputv=2 CTable 3 3 334 37 19 56 32 1 12 2 10 Begin Matrices; R STAN 2 2 FREE ! MZ cor T FUL 1 2 FREE ! TH of twin1 U FUL 1 2 FREE ! TH of twin2 End matrices; COvariance R/ !Model for the MZ correlation Thresholds T_U / !Model for the thresholds MA T 1.8 2.4 !starting values for the Twin 1 thresholds MA U 1.8 2.4 !starting values for the Twin 2 thresholds MA R .6 !starting value Cor Interval R 2 1 options RS end