Date: Thu, 19 Apr 2012 13:00:50 -0500 Warren Schlechte "SAS(r) Discussion" Warren Schlechte Re: Proc GLIMMIX - Estimate Question cc: "High, Robin R" <13DAEB09712F4D4382D11CB8FED4D26F8B46B3@UNMCEX3.unmcresforest.org> text/plain; charset="us-ascii"

Thanks Robin.

Thought the answers didn't look quite right.

So, what I really need is:

Proc summary data=data2b noprint; Var days; output out=means mean=avg_days; Run;

data _null_; set means; call symput("avg_days", put(avg_days,best32.)); run;

/* Other code */ estimate "S125: ndens=1, arch=1, Avg Days" intercept 1 ndens 1 0 0 arch 1 0 days &avg_days. / ilink cl;

Warren Schlechte Learn how you can help Texas State Parks

-----Original Message----- From: High, Robin R [mailto:rhigh@unmc.edu] Sent: Thursday, April 19, 2012 12:47 PM To: Warren Schlechte; SAS-L@LISTSERV.UGA.EDU Subject: RE: Proc GLIMMIX - Estimate Question

Warren,

Yes, it would the estimate at days = 0, so need to add the mean value of days, or specify the estimate to be computed for a specific value of day, e.g.,

estimate "S125: ndens=1, arch=1, day=5" intercept 1 ndens 1 0 0 arch 1 0 days 5 / ilink cl;

Robin High UNMC

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Warren Schlechte Sent: Thursday, April 19, 2012 11:33 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Proc GLIMMIX - Estimate Question

The following is the coding for a model I have run:

proc glimmix data=data2b ; class ndens tank arch; model out/in = arch ndens days /s dist=binomial link=logit e3 oddsratio; random _residual_; random intercept/subject=tank; output out=binom_pout predicted(ilink noblup) =p resid(ilink noblup)=r; estimate "S125" intercept 1 ndens 1 0 0 arch 1 0/ilink cl; run;

Some items to notice: * ndens, and arch are fixed categorical variables * tank is a random categorical variable * days is a fixed continuous variable * the random residual statement is included to help capture overdispersion in the binomial response.

What I am most interested in is this: Is the estimate statement giving me the predicted value for my first treatment of density and architecture at the average of the variable "days", and averaged across all "tanks"? Is that a correct assumption, and if not, how do I change the code to reflect the "average" conditions.

The reason I ask is, if I use the estimate statement, I get one estimate of the predicted outcome. If instead, I use the output statement, then create the summary statistics of the predicted values, I get a substantially different answer. The value from the estimate statement seems to reflect the estimate when days=0, not at the mean of days.

There is some unbalancedness within the design, but not so severe I would expect to see the differences I see.

Thanks.

Warren Schlechte HOH Fisheries Science Center 5103 Junction Hwy Mt. Home, TX 78058 Phone 830.866.3356 x214 Fax 830.866.3549

Learn how you can help Texas State Parks <http://bit.ly/sVdilb>

Back to: Top of message | Previous page | Main SAS-L page