06-22-2012 02:12 AM
My Statistician showed me yesterday a very strange behavior of the PROC GENMOD and using the BY-variable.
When calculating LS-means, the PROC GENMOD showed combinations, which were not available in the one particular BY-Group in our input data set.
The output below shows for year=2009 three machines G1, G2 and G3, although in the raw data, in the year 2009 for the BY-GROUP STRATA=2 only G2 and G3 were available.
When applying WHERE-Statement to the input data set, PROC GENMOD worked fine.
Does anyone have an idea, how this behavior could be explained?
(The input data set and PROC GEMNOD calls are attached.)
Thank you in advance,
06-22-2012 08:25 AM
I do not get the results presented for the by strata analysis. My strata=2 analysis using by group processing looks exactly like the where strata=2 analysis, and like the results you present. Could this be platform dependent? I am running SAS 9.3 (32 bit) on a Windows XP platform.
06-22-2012 08:41 AM
thanks, that's interesting, I'm using SAS 9.2 on Windows (XP).
So it might be a bug in 9.2 version?
06-22-2012 09:55 AM
I concur that it is a 9.2 problem. I ran it on the same machine using SAS 9.2 and duplicated your output The estimates and standard errors are correct in value, but are mislabeled throughout. I looked at the problem notes, and it appears there were some problems with the.aggregate option when using by=, but it looked like that was an 8.2 problem that had been fixed going forward. You really need to get in touch with Tech Support on this one. There may be a hotfix available.
07-04-2012 02:20 AM
You are right, it's the 9.2 problem.
I contacted the SAS technical support and they replied that unfortenatley there is no hotfix available for 9.2.
But apparently the problem is solved in 9.3 version.