*running model on unbalanced data w/ up to 18 male & 19 female students; *reading in unbalanced data; DATA unbalanced; infile 'C:\Documents and Settings\djbauer\My Documents\CSEM\Multilevel\file2.dat'; input school_id f3. ma1 f3. ma2 f3. ma3 f3. ma4 f3. ma5 f3. ma6 f3. ma7 f3. ma8 f3. ma9 f3. ma10 f3. ma11 f3. ma12 f3. ma13 f3. ma14 f3. ma15 f3. ma16 f3. ma17 f3. ma18 f3. fe1 f3. fe2 f3. fe3 f3. fe4 f3. fe5 f3. fe6 f3. fe7 f3. fe8 f3. fe9 f3. fe10 f3. fe11 f3. fe12 f3. fe13 f3. fe14 f3. fe15 f3. fe16 f3. fe17 f3. fe18 f3. fe19 f3. school_size f3.; RUN; * rearranging for PROC MIXED; DATA unbalanced2; SET unbalanced; Array m[18] ma1-ma18; Array f[19] fe1-fe19; DO i = 1 to 37; IF i < 19 THEN DO; sex = 0; language = m[i]; END; ELSE DO; j = i - 18; sex = 1; language = f[j]; END; IF MISSING(language) THEN; ELSE output; END; drop i j ma1-ma18 fe1-fe19; RUN; proc mixed data=unbalanced2 covtest method=ml; class school_id; model language = sex/solution ddfm=bw notest; random intercept sex/ type=un subject=school_id; run; The SAS System 13:57 Thursday, February 20, 2003 3 The Mixed Procedure Model Information Data Set WORK.UNBALANCED2 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 16491.06567939 The SAS System 13:57 Thursday, February 20, 2003 4 The Mixed Procedure Iteration History Iteration Evaluations -2 Log Like Criterion 1 2 16193.84965866 0.00011252 2 1 16193.10101848 0.00000407 3 1 16193.07598357 0.00000001 Convergence criteria met. Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(1,1) school_id 21.7938 3.8124 5.72 <.0001 UN(2,1) school_id -3.5897 2.4297 -1.48 0.1396 UN(2,2) school_id 3.4174 2.2609 1.51 0.0653 Residual 62.1256 1.9503 31.85 <.0001 Fit Statistics -2 Log Likelihood 16193.1 AIC (smaller is better) 16205.1 AICC (smaller is better) 16205.1 BIC (smaller is better) 16222.3 Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq 3 297.99 <.0001 Solution for Fixed Effects Standard Effect Estimate Error DF t Value Pr > |t| Intercept 39.1161 0.4746 130 82.42 <.0001 sex 2.6288 0.3800 2155 6.92 <.0001