Programming the statistical procedures from SAS

Getting SAS to include ANOVA tables in output for PROC MIXED

Reply
N/A
Posts: 0

Getting SAS to include ANOVA tables in output for PROC MIXED

Hi there,

A fellow researcher and I were discussing stats and he indicated that when asked to review papers for publication (we are both livestock researchers) he likes to see ANOVA tables. He likes to do this especially when several effects are in the P = 0.05-0.1 range to ensure that the error terms are not inflated and a Type 2 error (failing to reject the null hypothesis) is not being committed.

I analyze all of my experiments using PROC MIXED (where appropriate) and was wondering whether there is some way to get it to include the ANOVA tables in the output, in the event that I am ever asked to produce them to a reviewer. It seems to me that PROC GLM does this automatically and was wondering if it was as simple as just adding a line of code to my programs.

If anyone could offer a suggestion it would be much appreciated.
Frequent Contributor
Posts: 77

Re: Getting SAS to include ANOVA tables in output for PROC MIXED

Hi Matt O,

You might have noticed a "Type 3 Tests of Fixed Effects" table in the output produced by PROC MIXED. This table contains Type III F-statistics and p-values for the variables (fixed effects) in your model and can be considered an analog to an ANOVA table that PROC GLM produces. There are no sum of squares or mean sum of squares there because PROC MIXED uses maximum-likelihood estimation methods.
N/A
Posts: 0

Re: Getting SAS to include ANOVA tables in output for PROC MIXED

Thanks statsplank!
N/A
Posts: 0

Re: Getting SAS to include ANOVA tables in output for PROC MIXED

Hi Matt O,

If in the PROC MIXED statement you add METHOD=TYPE3, for example, you'll get expected mean squares and a Type 3 ANOVA table. This, however, does not work if you have subject effects, or a repeated statement. You can also use METHOD=TYPE1 or METHOD=TYPE2 depending on the type of sum of squares you want. This should match PROC GLM.

Hope this helps.

j.
Regular Contributor
Posts: 169

Re: Getting SAS to include ANOVA tables in output for PROC MIXED

Yes, adding the METHOD=TYPE3 option to the PROC MIXED statement is the key to getting an ANOVA table from the MIXED procedure. It should be noted that doing so results in moment estimates of the parameters of the model. The moment estimators and the REML estimators may be identical for some balanced designs. However, for unbalanced designs, moment and REML estimators are usually not identical. Be forewarned that if you redo some analyses using moment estimators which were already performed using REML estimation, then some of those marginally significant effects could show different p-values.

D.
Ask a Question
Discussion stats
  • 4 replies
  • 140 views
  • 0 likes
  • 3 in conversation