Dear All,
I am a beginner of SAS. I used glimmix procedure to model how a binary response variable was affected by several interested factors. The output gave inconsistent results of the significance test of one factor, "gender", from the "Solutions for Fixed Effects" and "Type III Tests of Fixed Effects" (please see the attached results). Could anybody tell me: 1) what's the reason for my results? Is it due to the nature of my dataset which is unbalanced? 2) And under this situation, how do I intepret my results? which result should I belive, "Solutions for Fixed Effects" or "Type III Tests of Fixed Effects"?
Thanks for the help.
Solutions for Fixed Effects
Effect Nestlingsex Estimate Standard Error DF t P
Intercept 2.7637 0.3415 446.8 8.09 <0.0001
……
Gender female -0.8945 0.3448 9237 -2.59 0.0095
Gender male 0
……
Type III Tests of Fixed Effects
Effect Num DF Den DF F Value Pr > F
……
Gender 1 9237 0.04 0.8491
……
That seems odd. Can you share your PROC GLIMMIX code, and the entirety of your Type3 output? I have a hunch you have some interactions with gender that might be significant, but I'm really just guessing.
Steve Denham
Thank you so much, Steve. The work is to examine what kinds of factors would affect whether a nestling bird would be fed during each feeding event. The SAS code and type 3 output are as follows:
proc glimmixdata = sasuser.EACHALLOCATION ;
class adult nestling gender nest position begging CB No_feeding_event;
title GLIMMIX Each Feeding preferenc;
model F_N(event='1') = adult gender position begging Tsize CB adult*gender adult*position adult*begging adult*Tsize adult*CB gender*position gender*begging gender*CB gender*Tsize position*begging position*CB position*Tsize begging*CB begging*Tsize Tsize*CB NO_begging_nestlings /solution ddfm=kr link = logit dist = binomial ;
random intercept no_feeding_event / subject=nest;
run;
Type III Tests of Fixed Effects | ||||
---|---|---|---|---|
Effect | Num DF | Den DF | F Value | Pr > F |
Adult | 2 | 6925 | 1.69 | 0.1845 |
Gender | 1 | 9237 | 0.04 | 0.8491 |
Position | 1 | 9237 | 844.43 | <.0001 |
Begging | 1 | 9237 | 338.44 | <.0001 |
Tsize | 1 | 9237 | 2.06 | 0.1516 |
CB | 1 | 32.61 | 0.22 | 0.6394 |
Adult*Gender | 2 | 9237 | 3.66 | 0.0259 |
Adult*Position | 2 | 9237 | 0.17 | 0.8460 |
Adult*Begging | 2 | 9237 | 4.29 | 0.0138 |
Tsize*Adult | 2 | 9237 | 4.48 | 0.0114 |
Adult*CB | 1 | 7807 | 0.18 | 0.6747 |
Gender*Position | 1 | 9237 | 2.61 | 0.1060 |
Gender*Begging | 1 | 9237 | 2.12 | 0.1454 |
Gender*CB | 1 | 5463 | 1.47 | 0.2253 |
Tsize*Gender | 1 | 9237 | 0.01 | 0.9216 |
Position*Begging | 1 | 9237 | 9.41 | 0.0022 |
Position*CB | 1 | 9237 | 1.81 | 0.1785 |
Tsize*Position | 1 | 9237 | 1.43 | 0.2313 |
Begging*CB | 1 | 9237 | 2.19 | 0.1390 |
Tsize*Begging | 1 | 9237 | 0.32 | 0.5746 |
Tsize*CB | 1 | 9237 | 0.23 | 0.6333 |
No_begging_nestlings | 1 | 2185 | 45.46 | <.0001 |
It doesn't depend on the significance of the interaction--the mere inclusion of the interaction in the model will lead to differences between the solution values and the F test values. I found this to be true even with balanced data. Thus, I would trust the F test values, for a couple of reasons. It considers the effect after "factoring out" all the other effects--it is meant to be an orthogonal test to all the other tests. The theory part of my brain seems to be non-functional this morning, but I know this difference should be apparent to me in the face of including interactions. The agreement will probably get worse with imbalance, especially with a Kenward-Rogers adjustment.
Steve Denham
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.