|
|
|
||||
|
|
|||||
This article appeared in Journal of Memory and Language (1999, vol. 41) and it can be accessed directly from a UCLA IP address. Every example here has been done both in proc glm and proc mixed to show the difference and connections between the two procedures. In most of the examples, we have shown two or more different styles of proc mixed syntax. One is from random effect ANOVA approach and the others are from multilevel model approach. To see more on the differences, visit SAS FAQ page on reproducing proc glm analysis with proc mixed. Also notice that the all the examples here are done with balanced data. The SAS code shown here may not work on unbalanced data.
Table 2, the data set for Table 3 and the computation that follows.
data m1; input ID ITEM Y TREAT @@; datalines; 1 1 546 0 1 2 567 0 1 3 547 0 1 4 566 0 1 5 554 1 1 6 545 1 1 7 594 1 1 8 522 1 2 1 566 0 2 2 556 0 2 3 538 0 2 4 566 0 2 5 512 1 2 6 523 1 2 7 569 1 2 8 524 1 3 1 567 0 3 2 598 0 3 3 568 0 3 4 584 0 3 5 536 1 3 6 539 1 3 7 589 1 3 8 521 1 4 1 556 0 4 2 565 0 4 3 536 0 4 4 550 0 4 5 516 1 4 6 522 1 4 7 560 1 4 8 486 1 5 1 595 0 5 2 609 0 5 3 585 0 5 4 588 0 5 5 578 1 5 6 540 1 5 7 615 1 5 8 546 1 6 1 569 0 6 2 578 0 6 3 560 0 6 4 583 0 6 5 501 1 6 6 535 1 6 7 568 1 6 8 514 1 7 1 527 0 7 2 554 0 7 3 535 0 7 4 527 0 7 5 480 1 7 6 467 1 7 7 540 1 7 8 473 1 8 1 551 0 8 2 575 0 8 3 558 0 8 4 556 0 8 5 588 1 8 6 563 1 8 7 631 1 8 8 558 1 ; run;
Table 3 and the calculation of F' on page 418 using the data above.
There are two forms of quasi F-ratio. One can find the definition for both in Kirk's Experimental Design (page 406-408). For example, for a CRF-pqr design, assuming a random effects model, F' and F'' for testing treatments B and C have the following form:
F' = MSB/(MSAB + MSBC - MSABC) F'' = (MSB + MSABC)/(MSAB + MSBC)
F' = MSC(MSAC + MSBC - MSABC) F'' =(MSA + MSABC)/(MSAC + MSBC)
One problem with F' is that it can be possibly negative since the denominator can be negative. F'' is a modification of F' to get around this problem.
In this article, the authors actually used the second form of quasi F-ratio, that is F'' in the definition above. Both proc glm and proc mixed will give F' in the definition above instead. This is why we will see slight discrepancy between the article and the output from SAS.
proc glm data= m1; class id item treat; model y = treat item(treat) id treat*id /ss3; run; quit;
Dependent Variable: Y
Sum of Source DF Squares Mean Square F Value Pr > F
Model 21 64045.45313 3049.78348 30.43 <.0001 Error 42 4208.78125 100.20908
Corrected Total 63 68254.23438
R-Square Coeff Var Root MSE Y Mean
0.938337 1.813128 10.01045 552.1094
Source DF Type III SS Mean Square F Value Pr > F
TREAT 1 8032.64063 8032.64063 80.16 <.0001 ITEM(TREAT) 6 22174.46875 3695.74479 36.88 <.0001 ID 7 26251.60938 3750.22991 37.42 <.0001 ID*TREAT 7 7586.73437 1083.81920 10.82 <.0001
Page 419 left column, subject analysis. Notice that we have two different syntax for proc mixed. They produce identical results. The first one is conceptualized as random effect ANOVA model and the second one is conceptualized as 2-level multilevel model.
proc glm data = m1; class id item treat; model y = treat id id*treat ; random id id*treat /test; run; quit;
The GLM Procedure Tests of Hypotheses for Mixed Model Analysis of Variance
Dependent Variable: Y
Source DF Type III SS Mean Square F Value Pr > F
TREAT 1 8032.640625 8032.640625 7.41 0.0297 ID 7 26252 3750.229911 3.46 0.0618
Error: MS(ID*TREAT) 7 7586.734375 1083.819196
Source DF Type III SS Mean Square F Value Pr > F
ID*TREAT 7 7586.734375 1083.819196 1.97 0.0787
Error: MS(Error) 48 26383 549.651042
proc mixed data = m1 ; class id item treat; model y = treat ; random id id*treat; run;
proc mixed data = m1 ; class id item treat; model y = treat ; random intercept treat /subject=id ; run;
Covariance Parameter Estimates
Cov Parm Subject Estimate
Intercept ID 333.30 TREAT ID 133.54 Residual 549.65
Fit Statistics
-2 Res Log Likelihood 592.3 AIC (smaller is better) 598.3 AICC (smaller is better) 598.7 BIC (smaller is better) 598.5
Type 3 Tests of Fixed Effects
Num Den Effect DF DF F Value Pr > F
TREAT 1 7 7.41 0.0297
Page 419 left column, item analysis. Notice that we have two different syntax for proc mixed. They produce identical results. The first one is conceptualized as random effect ANOVA model and the second one is conceptualized as 2-level multilevel model.
proc glm data = m1 ; class id item treat; model y = treat item*treat; random item*treat /test ; run; quit;
The GLM Procedure Tests of Hypotheses for Mixed Model Analysis of Variance
Dependent Variable: Y
Source DF Type III SS Mean Square F Value Pr > F
TREAT 1 8032.640625 8032.640625 2.17 0.1908 Error 6 22174 3695.744792 Error: MS(ITEM*TREAT)
Source DF Type III SS Mean Square F Value Pr > F
ITEM*TREAT 6 22174 3695.744792 5.44 0.0002
Error: MS(Error) 56 38047 679.412946
proc mixed data = m1 ; class id item treat; model y = treat ; random item*treat ; run; proc mixed data = m1 ; class id item treat; model y = treat ; random treat /subject=item ; run;
The Mixed Procedure
Covariance Parameter
Estimates
Cov Parm Estimate
ITEM*TREAT 377.04 Residual 679.41
Fit Statistics
-2 Res Log Likelihood 597.4 AIC (smaller is better) 601.4 AICC (smaller is better) 601.6 BIC (smaller is better) 601.5
Type 3 Tests of Fixed Effects
Num Den Effect DF DF F Value Pr > F
TREAT 1 6 2.17 0.1908
Page 419 left column, combined analysis using proc mixed or proc glm. Notice that we have a couple of different syntax for proc mixed. They produce identical results.
proc glm data = m1 ; class id item treat; model y = treat item(treat) id id*treat / e3; random item(treat) id id*treat /test; run; quit;
The GLM Procedure Tests of Hypotheses for Mixed Model Analysis of Variance
Dependent Variable: Y
Source DF Type III SS Mean Square F Value Pr > F
TREAT 1 8032.640625 8032.640625 1.72 0.2227 Error 8.9575 41915 4679.354911 Error: MS(ITEM(TREAT)) + MS(ID*TREAT) - MS(Error)
Source DF Type III SS Mean Square F Value Pr > F
ITEM(TREAT) 6 22174 3695.744792 36.88 <.0001 ID*TREAT 7 7586.734375 1083.819196 10.82 <.0001
Error: MS(Error) 42 4208.781250 100.209077
Source DF Type III SS Mean Square F Value Pr > F
ID 7 26252 3750.229911 3.46 0.0618
Error: MS(ID*TREAT) 7 7586.734375 1083.819196
proc mixed data = m1 method=type3; class id item treat; model y = treat ; random item(treat) id id*treat ; run;
The Mixed Procedure
Type 3 Analysis of Variance
Error Source Error Term DF F Value Pr > F
TREAT MS(ITEM(TREAT)) + MS(ID*TREAT) - MS(Residual) 8.9575 1.72 0.2227 ITEM(TREAT) MS(Residual) 42 36.88 <.0001 ID MS(ID*TREAT) 7 3.46 0.0618 ID*TREAT MS(Residual) 42 10.82 <.0001 Residual . . . .
Covariance Parameter
Estimates
Cov Parm Estimate
ITEM(TREAT) 449.44 ID 333.30 ID*TREAT 245.90 Residual 100.21
Fit Statistics
-2 Res Log Likelihood 532.2 AIC (smaller is better) 540.2 AICC (smaller is better) 540.9 BIC (smaller is better) 540.5
Type 3 Tests of Fixed Effects
Num Den Effect DF DF F Value Pr > F
TREAT 1 6 1.72 0.2381
proc mixed data = m1 ; class id item treat; model y = treat / solution DDFM=KENWARDROGER ; /*kenwardroger is required to get the right degrees of freedom*/ random treat intercept /subject=id; repeated id /subject=item type=cs; run;
Type 3 Tests of Fixed Effects
Num Den Effect DF DF F Value Pr > F
TREAT 1 8.96 1.72 0.2227
proc mixed data = m1 ; class id item treat; model y = treat / solution DDFM=KENWARDROGER ; random treat intercept /subject=id; random treat /subject=item ; run;
Type 3 Tests of Fixed Effects
Num Den Effect DF DF F Value Pr > F
TREAT 1 8.96 1.72 0.2227
Table 4 on page 422. This data set is used in the following sections for multiple examples.
data m2; input ID TREAT BLOCK Y @@; datalines; 1 1 1 493 1 1 2 519 1 1 3 513 1 1 4 542 1 2 1 499 1 2 2 525 1 2 3 502 1 2 4 557 2 1 1 562 2 1 2 552 2 1 3 565 2 1 4 591 2 2 1 544 2 2 2 536 2 2 3 533 2 2 4 563 3 1 1 519 3 1 2 558 3 1 3 555 3 1 4 567 3 2 1 575 3 2 2 582 3 2 3 551 3 2 4 587 4 1 1 518 4 1 2 523 4 1 3 514 4 1 4 563 4 2 1 523 4 2 2 565 4 2 3 539 4 2 4 597 5 1 1 567 5 1 2 562 5 1 3 577 5 1 4 595 5 2 1 521 5 2 2 563 5 2 3 559 5 2 4 575 6 1 1 520 6 1 2 534 6 1 3 527 6 1 4 568 6 2 1 512 6 2 2 541 6 2 3 531 6 2 4 559 7 1 1 516 7 1 2 544 7 1 3 513 7 1 4 575 7 2 1 555 7 2 2 569 7 2 3 550 7 2 4 601 8 1 1 525 8 1 2 528 8 1 3 528 8 1 4 559 8 2 1 551 8 2 2 542 8 2 3 529 8 2 4 578 ; run;
Table 6 using data in Table 4.
proc glm data = m2; class id block treat; model y = treat block id treat*block treat*id block*id /ss3; run; quit;
Dependent Variable: Y
Sum of Source DF Squares Mean Square F Value Pr > F
Model 42 40110.00000 955.00000 9.35 <.0001
Error 21 2143.93750 102.09226
Corrected Total 63 42253.93750
R-Square Coeff Var Root MSE Y Mean
0.949261 1.847285 10.10407 546.9688
Source DF Type III SS Mean Square F Value Pr > F
TREAT 1 770.06250 770.06250 7.54 0.0121 BLOCK 3 16985.31250 5661.77083 55.46 <.0001 ID 7 12758.18750 1822.59821 17.85 <.0001 BLOCK*TREAT 3 321.31250 107.10417 1.05 0.3916 ID*TREAT 7 6254.68750 893.52679 8.75 <.0001 ID*BLOCK 21 3020.43750 143.83036 1.41 0.2194
Page 422 right column, subject analysis..
proc glm data = m2; class id block treat; model y = treat id id*treat ; random id id*treat /test; run; quit;
The GLM Procedure Tests of Hypotheses for Mixed Model Analysis of Variance
Dependent Variable: Y
Source DF Type III SS Mean Square F Value Pr > F
TREAT 1 770.062500 770.062500 0.86 0.3841 ID 7 12758 1822.598214 2.04 0.1838
Error: MS(ID*TREAT) 7 6254.687500 893.526786
Source DF Type III SS Mean Square F Value Pr > F
ID*TREAT 7 6254.687500 893.526786 1.91 0.0888
Error: MS(Error) 48 22471 468.145833
proc mixed data = m2 ; class id block treat; model y = treat ; random id id*treat ; run;
proc mixed data = m2 ; class id block treat; model y = treat ; random intercept treat /subject=id; run;
Type 3 Tests of Fixed Effects
Num Den Effect DF DF F Value Pr > F
TREAT 1 7 0.86 0.3841
Page 422 right column, item analysis with matching.
proc glm data = m2 ; class id block treat; model y = treat block block*treat; random block*treat block /test; run; quit;
Tests of Hypotheses for Mixed Model Analysis of Variance
Dependent Variable: Y
Source DF Type III SS Mean Square F Value Pr > F
TREAT 1 770.062500 770.062500 7.19 0.0750 BLOCK 3 16985 5661.770833 52.86 0.0043
Error 3 321.312500 107.104167 Error: MS(BLOCK*TREAT)
Source DF Type III SS Mean Square F Value Pr > F
BLOCK*TREAT 3 321.312500 107.104167 0.25 0.8624
Error: MS(Error) 56 24177 431.736607
proc mixed data = m2 method=type3 ; class id block treat; model y = treat /solution ; random block block*treat; run;
Type 3 Analysis of Variance
Error Source Error Term DF F Value Pr > F
TREAT MS(BLOCK*TREAT) 3 7.19 0.0750 BLOCK MS(BLOCK*TREAT) 3 52.86 0.0043 BLOCK*TREAT MS(Residual) 56 0.25 0.8624 Residual . . . .
Covariance Parameter
Estimates
Cov Parm Estimate
BLOCK 347.17 BLOCK*TREAT -40.5791 Residual 431.74
Fit Statistics
-2 Res Log Likelihood 562.6 AIC (smaller is better) 568.6 AICC (smaller is better) 569.0 BIC (smaller is better) 566.8
Solution for Fixed Effects
Standard Effect TREAT Estimate Error DF t Value Pr > |t|
Intercept 550.44 9.4941 3 57.98 <.0001 TREAT 1 -6.9375 2.5873 3 -2.68 0.0750 TREAT 2 0 . . . .
Type 3 Tests of Fixed Effects
Num Den Effect DF DF F Value Pr > F
TREAT 1 3 7.19 0.0750
proc mixed data = m2; class id block treat ; model y = treat /solution ddfm=kenwardroger; random intercept / subject = block; repeated treat /subject=treat(block) type=cs; run;
Covariance Parameter Estimates
Cov Parm Subject Estimate
Intercept BLOCK 347.17 CS TREAT(BLOCK) -40.5791 Residual 431.74
Fit Statistics
-2 Res Log Likelihood 562.6 AIC (smaller is better) 568.6 AICC (smaller is better) 569.0 BIC (smaller is better) 566.8
Solution for Fixed Effects
Standard Effect TREAT Estimate Error DF t Value Pr > |t|
Intercept 550.44 9.4941 3.11 57.98 <.0001 TREAT 1 -6.9375 2.5873 3 -2.68 0.0750 TREAT 2 0 . . . .
Type 3 Tests of Fixed Effects
Num Den Effect DF DF F Value Pr > F
TREAT 1 3 7.19 0.0750
Page 422 right column, item analysis without matching.
proc glm data = m2 ; class id block treat; model y = treat block*treat; random block*treat /test; run; quit;
Tests of Hypotheses for Mixed Model Analysis of Variance
Dependent Variable: Y
Source DF Type III SS Mean Square F Value Pr > F
TREAT 1 770.062500 770.062500 0.27 0.6239 Error 6 17307 2884.437500 Error: MS(BLOCK*TREAT)
Source DF Type III SS Mean Square F Value Pr > F
BLOCK*TREAT 6 17307 2884.437500 6.68 <.0001
Error: MS(Error) 56 24177 431.736607
proc mixed data = m2 ; class id block treat; model y = treat ; random block*treat; run; proc mixed data = m2 ; class id block treat; model y = treat ; random treat /subject=block ; run;
Covariance Parameter Estimates
Cov Parm Subject Estimate
TREAT BLOCK 306.59 Residual 431.74
Fit Statistics
-2 Res Log Likelihood 570.5 AIC (smaller is better) 574.5 AICC (smaller is better) 574.7 BIC (smaller is better) 573.3
Type 3 Tests of Fixed Effects
Num Den Effect DF DF F Value Pr > F
TREAT 1 6 0.27 0.6239
Page 422 right column, combined analysis without matching.
proc glm data = m2; class block id treat; model y = treat id treat*id treat*block; random id treat*id treat*block /test; run; quit;
Tests of Hypotheses for Mixed Model Analysis of Variance
Dependent Variable: Y
Source DF Type III SS Mean Square F Value Pr > F
TREAT 1 770.062500 770.062500 0.21 0.6572 Error 8.8996 32528 3655.002976 Error: MS(ID*TREAT) + MS(BLOCK*TREAT) - MS(Error)
Source DF Type III SS Mean Square F Value Pr > F
ID 7 12758 1822.598214 2.04 0.1838
Error: MS(ID*TREAT) 7 6254.687500 893.526786
Source DF Type III SS Mean Square F Value Pr > F
ID*TREAT 7 6254.687500 893.526786 7.27 <.0001 BLOCK*TREAT 6 17307 2884.437500 23.46 <.0001
Error: MS(Error) 42 5164.375000 122.961310
proc mixed data = m2; class block id treat; model y = treat / ddfm = kenwardroger; random id treat*id treat*block; run;
Covariance Parameter
Estimates
Cov Parm Estimate
ID 116.13 ID*TREAT 192.64 BLOCK*TREAT 345.18 Residual 122.96
Fit Statistics
-2 Res Log Likelihood 532.9 AIC (smaller is better) 540.9 AICC (smaller is better) 541.6 BIC (smaller is better) 541.2
Type 3 Tests of Fixed Effects
Num Den Effect DF DF F Value Pr > F
TREAT 1 8.9 0.21 0.6572
proc mixed data = t2; class block id treat; model y = treat /solution ddfm = kenwardroger; random intercept treat /subject=id ; random treat /subject=block ; run;
Covariance Parameter Estimates
Cov Parm Subject Estimate
Intercept ID 116.13 TREAT ID 192.64 TREAT BLOCK 345.18 Residual 122.96
Fit Statistics
-2 Res Log Likelihood 532.9 AIC (smaller is better) 540.9 AICC (smaller is better) 541.6 BIC (smaller is better) 532.9
Solution for Fixed Effects
Standard Effect TREAT Estimate Error DF t Value Pr > |t|
Intercept 550.44 11.3462 11.1 48.51 <.0001 TREAT 1 -6.9375 15.1142 8.9 -0.46 0.6572 TREAT 2 0 . . . .
Type 3 Tests of Fixed Effects
Num Den Effect DF DF F Value Pr > F
TREAT 1 8.9 0.21 0.6572
proc mixed data = m2; class block id treat; model y = treat /solution ddfm = kenwardroger; random intercept treat /subject=id; random treat*block; run;
Num Den Effect DF DF F Value Pr > F
TREAT 1 8.9 0.21 0.6572
Page 422 right column, combined analysis with matching.
proc glm data = m2; class block id treat; model y = treat id treat*id treat*block block|id; random treat|id treat|block block|id /test; run; quit;
Tests of Hypotheses for Random Model Analysis of Variance
Dependent Variable: Y
Source DF Type III SS Mean Square F Value Pr > F
TREAT 1 770.062500 770.062500 0.86 0.3862
Error 6.8204 6128.403230 898.538690 Error: MS(ID*TREAT) + MS(BLOCK*TREAT) - MS(Error)
Source DF Type III SS Mean Square F Value Pr > F
ID 7 12758 1822.598214 1.95 0.1907
Error 7.5709 7080.797825 935.264881 Error: MS(ID*TREAT) + MS(BLOCK*ID) - MS(Error)
Source DF Type III SS Mean Square F Value Pr > F
ID*TREAT 7 6254.687500 893.526786 8.75 <.0001 BLOCK*TREAT 3 321.312500 107.104167 1.05 0.3916 BLOCK*ID 21 3020.437500 143.830357 1.41 0.2194
Error: MS(Error) 21 2143.937500 102.092262
Source DF Type III SS Mean Square F Value Pr > F
BLOCK 3 16985 5661.770833 38.04 0.0017
Error 4.1759 621.551813 148.842262 Error: MS(BLOCK*TREAT) + MS(BLOCK*ID) - MS(Error)
proc mixed data = m2; class id block treat ; model y = treat /solution ddfm= kenwardroger; random intercept treat block /subject = id ; random intercept / subject = block; repeated treat /subject=treat(block) type=cs; run;
The Mixed Procedure
Covariance Parameter Estimates
Cov Parm Subject Estimate
Intercept ID 110.92 TREAT ID 197.86 BLOCK ID 20.8690 Intercept BLOCK 344.56 CS TREAT(BLOCK) 0.6265 Residual 102.09
Fit Statistics
-2 Res Log Likelihood 524.4 AIC (smaller is better) 536.4 AICC (smaller is better) 538.0 BIC (smaller is better) 524.4
Solution for Fixed Effects
Standard Effect TREAT Estimate Error DF t Value Pr > |t|
Intercept 550.44 11.3462 6.02 48.51 <.0001 TREAT 1 -6.9375 7.4939 6.82 -0.93 0.3862 TREAT 2 0 . . . .
Type 3 Tests of Fixed Effects
Num Den Effect DF DF F Value Pr > F
TREAT 1 6.82 0.86 0.3862
Table 8 on page 425.
data m3; input id t g l y @@; cards; 1 1 1 1 511 2 1 1 1 522 3 1 1 1 588 4 1 1 1 554 1 2 1 2 514 2 2 1 2 550 3 2 1 2 595 4 2 1 2 567 1 3 1 3 496 2 3 1 3 514 3 3 1 3 563 4 3 1 3 544 5 1 2 3 571 6 1 2 3 476 7 1 2 3 489 8 1 2 3 553 5 2 2 1 591 6 2 2 1 483 7 2 2 1 514 8 2 2 1 560 5 3 2 2 596 6 3 2 2 492 7 3 2 2 519 8 3 2 2 565 9 1 3 2 536 10 1 3 2 600 11 1 3 2 511 12 1 3 2 490 9 2 3 3 517 10 2 3 3 569 11 2 3 3 498 12 2 3 3 476 9 3 3 1 534 10 3 3 1 592 11 3 3 1 509 12 3 3 1 483 ; run;
Table 10 on page 426 and analyses on page 425, first model without pooling.
proc glm data = m3; class g t l id; model y = g id(g) t l t*l; test h = t e = t*l; run; quit;
The GLM Procedure
Dependent Variable: y
Sum of Source DF Squares Mean Square F Value Pr > F
Model 17 52130.16667 3066.48039 104.37 <.0001
Error 18 528.83333 29.37963
Corrected Total 35 52659.00000
R-Square Coeff Var Root MSE y Mean
0.989957 1.014088 5.420298 534.5000
Source DF Type I SS Mean Square F Value Pr > F
g 2 1720.16667 860.08333 29.27 <.0001 id(g) 9 47206.16667 5245.12963 178.53 <.0001 t 2 51.50000 25.75000 0.88 0.4333 l 2 3106.16667 1553.08333 52.86 <.0001 t*l 2 46.16667 23.08333 0.79 0.4708
Source DF Type III SS Mean Square F Value Pr > F
g 0 0.00000 . . . id(g) 9 47206.16667 5245.12963 178.53 <.0001 t 2 51.50000 25.75000 0.88 0.4333 l 2 3106.16667 1553.08333 52.86 <.0001 t*l 2 46.16667 23.08333 0.79 0.4708
Tests of Hypotheses Using the Type III MS for t*l as an Error Term
Source DF Type III SS Mean Square F Value Pr > F
t 2 51.50000000 25.75000000 1.12 0.4727
Table 10 on page 426 and analyses on page 425, first model with pooling.
proc glm data = m3; class g t l id; model y = g id(g) t l ; test h = g e = id(g); run; quit;
Sum of Source DF Squares Mean Square F Value Pr > F
Model 15 52084.00000 3472.26667 120.77 <.0001
Error 20 575.00000 28.75000
Corrected Total 35 52659.00000
R-Square Coeff Var Root MSE y Mean
0.989081 1.003162 5.361903 534.5000
Source DF Type I SS Mean Square F Value Pr > F
g 2 1720.16667 860.08333 29.92 <.0001 id(g) 9 47206.16667 5245.12963 182.44 <.0001 t 2 51.50000 25.75000 0.90 0.4241 l 2 3106.16667 1553.08333 54.02 <.0001
Source DF Type III SS Mean Square F Value Pr > F
g 2 1720.16667 860.08333 29.92 <.0001 id(g) 9 47206.16667 5245.12963 182.44 <.0001 t 2 51.50000 25.75000 0.90 0.4241 l 2 3106.16667 1553.08333 54.02 <.0001
Tests of Hypotheses Using the Type III MS for id(g) as an Error Term
Source DF Type III SS Mean Square F Value Pr > F
g 2 1720.166667 860.083333 0.16 0.8512
proc mixed data = m3; class g t l id; model y = t /solution; random id(g) l ; run;
proc mixed data = m3; class g t l id; model y = t /solution ; random intercept /subject=id(g); random intercept /subject=l; run;
The Mixed Procedure
Covariance Parameter Estimates
Cov Parm Subject Estimate
Intercept id(g) 1473.03 Intercept l 127.03 Residual 28.7500
Fit Statistics
-2 Res Log Likelihood 275.4 AIC (smaller is better) 281.4 AICC (smaller is better) 282.2 BIC (smaller is better) 275.4
Solution for Fixed Effects
Standard Effect t Estimate Error DF t Value Pr > |t|
Intercept 533.92 12.9418 12.1 41.26 <.0001 t 1 -0.5000 2.1890 20 -0.23 0.8216 t 2 2.2500 2.1890 20 1.03 0.3163 t 3 0 . . . .
Type 3 Tests of Fixed Effects
Num Den Effect DF DF F Value Pr > F
t 2 20 0.90 0.4241
UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services