*running model on unbalanced data with continuous covariate of IQ; *reading in dataset; DATA complex; infile 'C:\Documents and Settings\djbauer\My Documents\CSEM\Multilevel\file4.dat'; input #1 school_id f3. lang1 f3. lang2 f3. lang3 f3. lang4 f3. lang5 f3. lang6 f3. lang7 f3. lang8 f3. lang9 f3. lang10 f3. lang11 f3. lang12 f3. lang13 f3. lang14 f3. lang15 f3. lang16 f3. lang17 f3. lang18 f3. lang19 f3. lang20 f3. lang21 f3. lang22 f3. lang23 f3. lang24 f3. lang25 f3. #2 lang26 f3. lang27 f3. lang28 f3. lang29 f3. lang30 f3. lang31 f3. lang32 f3. lang33 f3. lang34 f3. lang35 f3. sex1 f2. sex2 f2. sex3 f2. sex4 f2. sex5 f2. sex6 f2. sex7 f2. sex8 f2. sex9 f2. sex10 f2. sex11 f2. sex12 f2. sex13 f2. sex14 f2. sex15 f2. sex16 f2. sex17 f2. sex18 f2. sex19 f2. sex20 f2. sex21 f2. sex22 f2. sex23 f2. sex24 f2. sex25 f2. #3 sex26 f2. sex27 f2. sex28 f2. sex29 f2. sex30 f2. sex31 f2. sex32 f2. sex33 f2. sex34 f2. sex35 f2. iq1 f5.1 iq2 f5.1 iq3 f5.1 iq4 f5.1 iq5 f5.1 iq6 f5.1 iq7 f5.1 iq8 f5.1 iq9 f5.1 iq10 f5.1 iq11 f5.1 iq12 f5.1 #4 iq13 f5.1 iq14 f5.1 iq15 f5.1 iq16 f5.1 iq17 f5.1 iq18 f5.1 iq19 f5.1 iq20 f5.1 iq21 f5.1 iq22 f5.1 iq23 f5.1 iq24 f5.1 iq25 f5.1 iq26 f5.1 iq27 f5.1 iq28 f5.1 #5 iq29 f5.1 iq30 f5.1 iq31 f5.1 iq32 f5.1 iq33 f5.1 iq34 f5.1 iq35 f5.1 class_size f3.; RUN; * rearranging for PROC MIXED; DATA complex2; SET complex; Array l[35] lang1-lang35; Array s[35] sex1-sex35; Array q[35] iq1-iq35; DO i = 1 to 35; language = l[i]; sex = s[i]; iq = q[i]; IF MISSING(language) THEN; ELSE output; END; drop i lang1-lang35 sex1-sex35 iq1-iq35; RUN; PROC STANDARD data=complex2 mean=0 out=complex3; *standardizing IQ; VAR IQ; RUN; DATA complex3; set complex3; *Rounding to ensure equivalence with Mplus; IQ = round(IQ,.000001); RUN; proc mixed data=complex3 covtest method=ml; class school_id; model language = iq /solution ddfm=bw notest; random intercept iq/ type=un subject=school_id; run; The SAS System 13:57 Thursday, February 20, 2003 7 The Mixed Procedure Model Information Data Set WORK.COMPLEX3 Dependent Variable language Covariance Structure Unstructured Subject Effect school_id Estimation Method ML Residual Variance Method Profile Fixed Effects SE Method Model-Based Degrees of Freedom Method Between-Within Class Level Information Class Levels Values school_id 131 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 Dimensions Covariance Parameters 4 Columns in X 2 Columns in Z Per Subject 2 Subjects 131 Max Obs Per Subject 35 Observations Used 2287 Observations Not Used 0 Total Observations 2287 Iteration History Iteration Evaluations -2 Log Like Criterion 0 1 15477.68832010 The SAS System 13:57 Thursday, February 20, 2003 8 The Mixed Procedure Iteration History Iteration Evaluations -2 Log Like Criterion 1 2 15231.06810304 0.00004804 2 1 15230.78218740 0.00000085 3 1 15230.77745029 0.00000000 Convergence criteria met. Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(1,1) school_id 9.3527 1.5237 6.14 <.0001 UN(2,1) school_id -1.1448 0.3139 -3.65 0.0003 UN(2,2) school_id 0.2100 0.1009 2.08 0.0187 Residual 41.4805 1.2936 32.07 <.0001 Fit Statistics -2 Log Likelihood 15230.8 AIC (smaller is better) 15242.8 AICC (smaller is better) 15242.8 BIC (smaller is better) 15260.0 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 3 246.91 <.0001 Solution for Fixed Effects Standard Effect Estimate Error DF t Value Pr > |t| Intercept 40.7095 0.3042 130 133.81 <.0001 iq 2.5264 0.08145 2155 31.02 <.0001