Programming the statistical procedures from SAS

PROG GENMOD and BY: output shows combinations, which were not in the by-group in the input data set?

Reply
Contributor
Posts: 28

PROG GENMOD and BY: output shows combinations, which were not in the by-group in the input data set?

Dear all,

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.

genmod-by.png

When applying WHERE-Statement to the input data set, PROC GENMOD worked fine.

genmod-where.png

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,

Natalie

Attachment
Respected Advisor
Posts: 2,655

Re: PROG GENMOD and BY: output shows combinations, which were not in the by-group in the input data set?

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.

Steve Denham

Contributor
Posts: 28

Re: PROG GENMOD and BY: output shows combinations, which were not in the by-group in the input data set?


Dear Steve,

thanks, that's interesting, I'm using SAS 9.2 on Windows (XP).

So it might be a bug in 9.2 version?

Natalie

Respected Advisor
Posts: 2,655

Re: PROG GENMOD and BY: output shows combinations, which were not in the by-group in the input data set?

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.

Steve Denham

Contributor
Posts: 28

Re: PROG GENMOD and BY: output shows combinations, which were not in the by-group in the input data set?

Hi Steve,

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.

Natalie

Ask a Question
Discussion stats
  • 4 replies
  • 236 views
  • 0 likes
  • 2 in conversation