I have a logistic model that will require a random effect, requiring GLIMMIX. However, before adding the random effect, I wanted to make sure I was specifying my model correctly without a random effect in GLIMMIX by comparing it to the output from GENMOD and LOGISTIC. My code is below. All variables are dichotomous: random (ACASI vs. FTF), time (2 vs 1), discTrt (Yes vs No). The three procedures all give the exact same parameter estimates and standard errors. GENMOD and LOGISTIC use Wald Chi-square to give p-values and these are identical. GLIMMIX uses t tests instead, but the p-values are extremely similar. Great! There are differences in the Type 3 Analyses. The differences between GENMOD and LOGISTIC are extremely small and are due to GENMOD using LR test and LOGISTIC using Wald test. As expected with all dichotomous variables, in LOGISTIC, the parameter estimate p-values equal the Type 3 p-values, because they are both doing the same Wald test. The parameter estimate p-values in GENMOD equal the parameter estimate p-values from LOGISTIC and the Type 3 LOGISTIC, again, because they are all using the same Wald test. The only odd man out is the Type 3 GENMOD due to the use of LR. I'm comfortable with this. However, GLIMMIX instead performs an F test. There are several unexpected things with this F test. Perhaps they are obvious and I'm just overthinking it. First, with dichotomous variables, I would expect the Type 3 F test statistic to simply be the parameter t statistic squared, as the F stat has 1 num df and the same denom df as the t stat. This is not the case for either main effect, but is the case (considering rounding) for the interaction. Thus, the p-values for the parameter estimates and the Type 3 tests, which I expect to be the same for dichotomous predictors, are different. If I remove the interaction from the model, then the F stats do equal the t stats squared. Second, as a consequence of the first problem, the Type 3 p-values for the two main effects are no longer similar to the Type 3 p-values from GENMOD or LOGISTIC. Again, if I remove the interaction, then all three procedures agree. Something is going on with GLIMMIX when an interaction is included that is different from GENMOD and LOGISTIC. I can conceptually understand Wald Chi-sq and LR test, so perhaps I'm just no understanding the F test GLIMMIX is using and how the interaction would affect it. In my results, also below, this doesn't much matter, as the interaction is not significant and can be removed from the model. However, I am worried that there could be a case where the interaction is significant and must be kept. Could there be a circumstance where a main effect in LOGISTIC/GENMOD is significant but the main effect is not significant in GLIMMIX, or vice versa? This would change the interpretation quite a bit. Any insight would be appreciated. ods select Tests3 ParameterEstimates; proc glimmix data = aq; class random (ref = 'FTF') time (ref = '1') discTrt (ref = 'No'); model discTrt = random|time / dist = binary solution chisq; run; ods select Type3 ParameterEstimates; proc genmod data = aq descending; class random (ref = 'FTF') time (ref = '1') discTrt (ref = 'No') / param = ref; model discTrt = random|time / dist = binomial type3; run; ods select Type3 ParameterEstimates; proc logistic data = aq; class random (ref = 'FTF') time (ref = '1') discTrt (ref = 'No') / param = ref; model discTrt = random|time; run; GLIMMIX Parameter Estimates Effect random time Estimate Standard Error DF t Value Pr > |t| Intercept -1.1081 0.1949 741 -5.68 <.0001 random ACASI 0.4360 0.2636 741 1.65 0.0985 random FTF 0 . . . . time 2 -0.9257 0.2800 741 -3.31 0.0010 time 1 0 . . . . random*time ACASI 2 -0.4120 0.3918 741 -1.05 0.2933 random*time ACASI 1 0 . . . . random*time FTF 2 0 . . . . random*time FTF 1 0 . . . . Type III Tests of Fixed Effects Effect Num DF Den DF Chi-Square F Value Pr > chiSq Pr > F random 1 741 1.38 1.38 0.2403 0.2407 time 1 741 33.38 33.38 <.0001 <.0001 random*time 1 741 1.11 1.11 0.2930 0.2933 GENMOD Analysis of Maximum Likelihood Parameter Estimates Parameter DF Estimate Standard Error Wald 95% Confidence Limits Wald Chi-Square Pr > ChiSq Intercept 1 -1.1081 0.1949 -1.4902 -0.7260 32.31 <.0001 random ACASI 1 0.4360 0.2636 -0.0806 0.9526 2.74 0.0981 time 2 1 -0.9257 0.2800 -1.4744 -0.3769 10.93 0.0009 random*time ACASI 2 1 -0.4120 0.3918 -1.1798 0.3559 1.11 0.2930 Scale 0 1.0000 0.0000 1.0000 1.0000 Note: The scale parameter was held fixed. LR Statistics For Type 3 Analysis Source DF Chi-Square Pr > ChiSq random 1 2.76 0.0966 time 1 11.00 0.0009 random*time 1 1.11 0.2924 LOGISTIC Type 3 Analysis of Effects Effect DF Wald Chi-Square Pr > ChiSq random 1 2.7361 0.0981 time 1 10.9306 0.0009 random*time 1 1.1059 0.2930 Analysis of Maximum Likelihood Estimates Parameter DF Estimate Standard Error Wald Chi-Square Pr > ChiSq Intercept 1 -1.1081 0.1949 32.3077 <.0001 random ACASI 1 0.4360 0.2636 2.7361 0.0981 time 2 1 -0.9257 0.2800 10.9306 0.0009 random*time ACASI 2 1 -0.4120 0.3918 1.1059 0.2930
... View more