Forgive me for this one. It's one I would have known in my sleep five years ago but now I've forgotten and I don't have the time to figure it out.
I have 10 groups with 6-9 observations in each group. Everything is independent. I do PROC GENMOD with a response y and with one predictor x that has 10 levels (the 10 groups). And I put x in a CLASS statement too. And then I write a bunch of ESTIMATE statements to do the various comparisons the investigator is interested in.
Fine. But then the investigator comes back and wonders how one of the comparisons can be significant. The ESTIMATE statement is written correctly so that's no problem. But in fooling around looking into this I do it using PROC GLM...everything else is the same....same MODEL, CLASS and ESTIMATE statements...and I'll be darn if the p-value on the one comparison the investigator didn't go from 0.02 to 0.71. The p-values on the other ESTIMATE statements changed a bit but not too much, although it seems like most of them increased. But that one p just exploded.
So the question is, how/why did it change from GENMOD to GLM? It distresses me that they'd be so different when I'd expect little if any change. It seems this should be a straightforward matter of comparing the 10 groups in various ways. Any info is appreciated.
I had only looked some on the SAS software help. I looked at the SAS website just now and it says the output from the two PROCs should be the same, which is what I originally thought. So I'll have to check the code again but I could've sworn it's the same with both GENMOD and GLM.
Actually it's not the regular GENMOD and GLM output that was different (I diidn't even check that actually) but rather the results from the ESTIMATE statements that were different. So maybe even though the procs give the same output in general they give different output on identical ESTIMATE statements, perhaps because different paramaterizations are used. I'll check into it but if anyone has any idea off the top of their heads please pipe up.
If you used a distribution other than the normal in GENMOD, then the results will certainly differ from GLM which assumes a normal distribution. Other than that, GENMOD fits the model via maximum likelihood, while GLM uses ordinary least squares. The paramterization of CLASS variables is the same (non-full rank 0,1 dummy coding) by default, but you can select a different parameterization in GENMOD's CLASS statement if you specify appropriate options. If you use a different parameterization, you will get different results.