New Contributor
Posts: 4

# Question about estimate statement in GENMOD

Hello,

I am working with a polynomial regression model using generalized estimating equations in GENMOD.  My goal in using the estimate statement is to compare treatment groups at various time point.  I am having problems getting the estimate statement to work with my reference treatment group at particular time points and I am not sure why.

The time points that I am using are 60, 90, 120, 150, 180, 210, 240, and 270.  The time variables are centered using a mean value of 165. time1 is the centered value of time, time2 is this value squared, and time3 is this value cubed.   I have 5 treatment groups and am trying to estimate the difference between two groups, one of which is the reference group in the model.  I tried to code the reference group as I did all other groups, but this did not work, so I set the reference group to zero.  The estimate statement produces the expected result for the first estimate statement but indicates that the second estimate statement is non-estimable.

Any insight would be greatly appreciated.

proc genmod data = diblong1;

class treatment mouse_ID;

model lngluc = treatment time1 time2 time3 treatment*time1 treatment*time2 treatment*time3/type3;

repeated subject=mouse_ID / corr=EXCH corrw;

estimate 'Diff tx1 vs. tx5 at time = 60'   treatment 1 0 0 0 0

treatment*time1 -105 0 0 0 0

treatment*time2 11025 0 0 0 0

treatment*time3 -1157625 0 0 0 0;

estimate 'Diff tx1 vs. tx5 at time = 150'  treatment 1 0 0 0 0

treatment*time1 -15 0 0 0 0

treatment*time2 225 0 0 0 0

treatment*time3 -3375 0 0 0 0;

run;

Thanks!

Susan

Posts: 2,655

## Re: Question about estimate statement in GENMOD

I honestly think that the first estimate statement, while estimable, is not giving you what you think you want.  If you are on v9.22 or higher, you should have access to the LSMESTIMATE statement, which would make this much easier to write.

lsmestimate treatment 'Diff tx1 vs. tx5 at time = 60'  1 0 0 0 -1/at (time1 time2 time3)=(-105 11025 -1157625);

lsmestimate treatment 'Diff tx1 vs. tx5 at time = 150'  1 0 0 0 -1/at (time1 time2 time3)=(-15 225 -3375);

However, if you are bound to the use of the estimate statement, I recommend doing some first passes using the LSMEANS statement with the AT= and E options.  This will make it much more obvious what coefficients go into the estimate.

I also notice that your dependent variable is "lngluc" and that you do not specify any distributions.  You may want to give serious consideration to switching to PROC MIXED (or GLIMMIX) for the analysis, which will open a richer source of variance-covariance structures.

I hope this gets you started in a workable direction.

Steve Denham

New Contributor
Posts: 4