In this chapter we will be using the following centered variables: GndC_verb is iq_verb centered around the grand mean; GrpMC_verb contains the group means of GndC_verb; GndC_ses is ses centered around the grand mean.
We are using the schools3 data set from chapter 5 containing the centered variables mentioned in the first paragraph. The following is code is for creating schools3 from the mlbook1 dataset.
data schools; set 'c:sasmlbook1'; run; *centering verb_iq around grand mean. ; proc sql; create table schools1 as select *, iq_verb - mean(iq_verb) as GndC_verb from schools; quit; *Creating GrpMC_verb contains group means of GndC_iq. ; proc sql; create table schools2 as select *, mean(GndC_verb) as GrpMC_verb from schools1 group by schoolnr; quit; *Creating the variable GndC_ses equal to ses centered around its grand mean.; proc sql; create table schools3 as select *, ses - mean(ses) as GndC_ses from schools2; quit;
Table 8.1, p. 111
The homoscedastic model.
proc mixed data=schools3 covtest noclprint noitprint method=ml dfbw; class schoolnr; model langpost = GndC_verb GndC_ses sex GrpMC_verb / solution; random intercept GndC_verb / subject=schoolnr type=un; run; <output omitted> Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(1,1) schoolNR 8.2740 1.3422 6.16 <.0001 UN(2,1) schoolNR -0.7629 0.2767 -2.76 0.0058 UN(2,2) schoolNR 0.1686 0.08534 1.98 0.0241 Residual 37.5565 1.1677 32.16 <.0001 Fit Statistics -2 Log Likelihood 15005.5 AIC (smaller is better) 15023.5 AICC (smaller is better) 15023.6 BIC (smaller is better) 15049.4 Solution for Fixed Effects Standard Effect Estimate Error DF t Value Pr > |t| Intercept 39.5300 0.3132 129 126.20 <.0001 GndC_verb 2.2676 0.08080 2153 28.06 <.0001 GndC_ses 0.1518 0.01436 2153 10.57 <.0001 sex 2.6442 0.2637 2153 10.03 <.0001 GrpMC_verb 1.0226 0.3223 129 3.17 0.0019
Table 8.1, p. 111
The heteroscedastic model.
*we create a dummy variable for sex to include sex both as cont and categorical; data schools3; set schools3; id = sex; run; proc mixed data=schools3 noitprint noclprint covtest method = ml dfbw; class id pupilnr; model langpost = gndc_verb GndC_ses sex GrpMC_verb / solution; random intercept GndC_verb / subject=schoolnr g type = un; repeated /subject = pupilnr group= id; run; <output omitted> Covariance Parameter Estimates Standard Z Cov Parm Subject Group Estimate Error Value Pr Z UN(1,1) schoolNR 8.2388 1.3388 6.15 <.0001 UN(2,1) schoolNR -0.7750 0.2778 -2.79 0.0053 UN(2,2) schoolNR 0.1715 0.08615 1.99 0.0232 Residual pupilNR id 0 38.7210 1.6778 23.08 <.0001 Residual pupilNR id 1 36.2939 1.6428 22.09 <.0001 Fit Statistics -2 Log Likelihood 15004.4 AIC (smaller is better) 15024.4 AICC (smaller is better) 15024.5 BIC (smaller is better) 15004.4 Solution for Fixed Effects Standard Effect Estimate Error DF t Value Pr > |t| Intercept 39.5336 0.3143 2282 125.77 <.0001 GndC_verb 2.2641 0.08095 2282 27.97 <.0001 GndC_ses 0.1513 0.01434 2282 10.55 <.0001 sex 2.6415 0.2634 2282 10.03 <.0001 GrpMC_verb 1.0139 0.3221 2282 3.15 0.0017