* rearranging data for multivariate PROC MIXED; * setting up control items for 2 factor model; DATA _null_; set new; file 'C:\Documents and Settings\djbauer\My Documents\CSEM\Multilevel\HSBdat\Mixed1.dat'; item1 = 1; item0 = 0; Array c1[30] c1n1-c1n30; Array c2[30] c2n1-c2n30; Array c3[30] c3n1-c3n30; Array c4[30] c4n1-c4n30; Array c5[30] c5n1-c5n30; Array c6[30] c6n1-c6n30; Array c7[30] c7n1-c7n30; Array c8[30] c8n1-c8n30; Array c9[30] c9n1-c9n30; Array s[30] sex1-sex30; DO i = 1 to 30; put c1[i] f10.8 item1 f2. item0 f2. s[i] f3. i f4. school_id f6.; put c2[i] f10.8 item1 f2. item0 f2. s[i] f3. i f4. school_id f6.; put c3[i] f10.8 item1 f2. item0 f2. s[i] f3. i f4. school_id f6.; put c4[i] f10.8 item1 f2. item0 f2. s[i] f3. i f4. school_id f6.; put c5[i] f10.8 item0 f2. item1 f2. s[i] f3. i f4. school_id f6.; put c6[i] f10.8 item0 f2. item1 f2. s[i] f3. i f4. school_id f6.; put c7[i] f10.8 item0 f2. item1 f2. s[i] f3. i f4. school_id f6.; put c8[i] f10.8 item0 f2. item1 f2. s[i] f3. i f4. school_id f6.; put c9[i] f10.8 item0 f2. item1 f2. s[i] f3. i f4. school_id f6.; END; RUN; DATA mixed; infile 'C:\Documents and Settings\djbauer\My Documents\CSEM\Multilevel\HSBdat\Mixed1.dat'; input control eta1 eta2 sex teach_id school_id; RUN; *removing missing; DATA mixed; set mixed; where control ne .; RUN; * Running factor model where lambdas = 1, errors free; * Runs for 1 hour; PROC MIXED data=mixed noclprint covtest method=ml; title 'multilevel CFA w/ free error variances'; class teach_id school_id; model control = /noint solution ddfm=bw; random eta1 eta2 /type=un sub=school_id; random eta1 eta2 /type=un sub=teach_id(school_id); repeated /type=un(1) sub=teach_id(school_id); RUN; multilevel CFA w/ free error variances 23 13:57 Thursday, February 20, 2003 The Mixed Procedure Model Information Data Set WORK.MIXED Dependent Variable control Covariance Structure Unstructured Subject Effects school_id, teach_id(school_id), teach_id(school_id) Estimation Method ML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method Between-Within Dimensions Covariance Parameters 51 Columns in X 0 Columns in Z Per Subject 62 Subjects 456 Max Obs Per Subject 270 Observations Used 92334 Observations Not Used 0 Total Observations 92334 Iteration History Iteration Evaluations -2 Log Like Criterion 0 1 304913.42794646 1 3 275933.53630515 0.00818253 2 1 275418.28124368 0.00116172 3 1 275350.42600579 0.00003890 4 1 275348.32045325 0.00000006 5 1 275348.31741435 0.00000000 Convergence criteria met. Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(1,1) school_id 0.2566 0.02074 12.37 <.0001 UN(2,1) school_id 0.07137 0.008141 8.77 <.0001 UN(2,2) school_id 0.05467 0.004930 11.09 <.0001 UN(1,1) teach_id(school_id) 0.6338 0.01394 45.46 <.0001 multilevel CFA w/ free error variances 24 13:57 Thursday, February 20, 2003 The Mixed Procedure Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(2,1) teach_id(school_id) 0.1784 0.006471 27.57 <.0001 UN(2,2) teach_id(school_id) 0.2795 0.005684 49.18 <.0001 UN(1,1) teach_id(school_id) 1.1823 0.02033 58.17 <.0001 UN(2,1) teach_id(school_id) 0 . . . UN(2,2) teach_id(school_id) 1.4150 0.02354 60.11 <.0001 UN(3,1) teach_id(school_id) 0 . . . UN(3,2) teach_id(school_id) 0 . . . UN(3,3) teach_id(school_id) 1.3997 0.02325 60.19 <.0001 UN(4,1) teach_id(school_id) 0 . . . UN(4,2) teach_id(school_id) 0 . . . UN(4,3) teach_id(school_id) 0 . . . UN(4,4) teach_id(school_id) 1.1663 0.02013 57.93 <.0001 UN(5,1) teach_id(school_id) 0 . . . UN(5,2) teach_id(school_id) 0 . . . UN(5,3) teach_id(school_id) 0 . . . UN(5,4) teach_id(school_id) 0 . . . UN(5,5) teach_id(school_id) 1.2880 0.01929 66.76 <.0001 UN(6,1) teach_id(school_id) 0 . . . UN(6,2) teach_id(school_id) 0 . . . UN(6,3) teach_id(school_id) 0 . . . UN(6,4) teach_id(school_id) 0 . . . UN(6,5) teach_id(school_id) 0 . . . UN(6,6) teach_id(school_id) 0.8576 0.01333 64.34 <.0001 UN(7,1) teach_id(school_id) 0 . . . UN(7,2) teach_id(school_id) 0 . . . UN(7,3) teach_id(school_id) 0 . . . UN(7,4) teach_id(school_id) 0 . . . UN(7,5) teach_id(school_id) 0 . . . UN(7,6) teach_id(school_id) 0 . . . UN(7,7) teach_id(school_id) 0.3011 0.005843 51.52 <.0001 UN(8,1) teach_id(school_id) 0 . . . UN(8,2) teach_id(school_id) 0 . . . UN(8,3) teach_id(school_id) 0 . . . UN(8,4) teach_id(school_id) 0 . . . UN(8,5) teach_id(school_id) 0 . . . UN(8,6) teach_id(school_id) 0 . . . UN(8,7) teach_id(school_id) 0 . . . UN(8,8) teach_id(school_id) 0.9359 0.01436 65.19 <.0001 UN(9,1) teach_id(school_id) 0 . . . UN(9,2) teach_id(school_id) 0 . . . UN(9,3) teach_id(school_id) 0 . . . UN(9,4) teach_id(school_id) 0 . . . UN(9,5) teach_id(school_id) 0 . . . UN(9,6) teach_id(school_id) 0 . . . UN(9,7) teach_id(school_id) 0 . . . multilevel CFA w/ free error variances 25 13:57 Thursday, February 20, 2003 The Mixed Procedure Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(9,8) teach_id(school_id) 0 . . . UN(9,9) teach_id(school_id) 0.3776 0.006890 54.81 <.0001 Fit Statistics -2 Log Likelihood 275348.3 AIC (smaller is better) 275378.3 AICC (smaller is better) 275378.3 BIC (smaller is better) 275440.2 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 14 29565.11 <.0001