I am using PROC NLMIXED to produce a poisson mixed model (I'm using this method instead of GLIMMIX or GENMOD because I need the correct confidence intervals for the Pre/Post difference in means). The first model is the fixed effects model, the second model is the mixed model:
FIXED EFFECTS MODEL (matches results from GLIMMIX, GENMOD)
PROC NLMIXED data=prepost;
PARMS b0=-1.6 b1=0.1;
eta = b0 + b1*prepost2;
lambda=exp(eta);
model countRx=poisson(lambda);
estimate 'pre level ' exp(b0);
estimate 'post level' exp(b0 + b1);
estimate 'pre-post difference' exp(b0+b1)-exp(b0);
run;
RANDOM EFFECTS MODEL (to adjust for correct pre post estimates)
PROC NLMIXED data=prepost;
PARMS b0=-1.6 b1=0.1 s2u=0;
eta = b0 + b1*prepost2 + u;
lambda=exp(eta);
model countRx=poisson(lambda);
random u~normal(0, s2u) subject=enrolid
estimate 'pre level ' exp(b0);
estimate 'post level' exp(b0 + b1);
estimate 'pre-post difference' exp(b0+b1)-exp(b0);
run;
Here's the problem:
The fixed effects model gives these estimates:
parameter estimates
bo -1.5994
b1 0.09337
estimates
period countRx
pre 0.2020
post 0.2218
pre-post 0.01977
But the random effects model gives these estimates:
parameter estimates
bo -6.4813
b1 0.09337
s2u 26.2858
estimates
period countRx
pre 0.001532
post 0.001682
pre-post 0.000150
We would expect some changes because of the switch from independent measures to a repeated measures model, but nothing like this. What is the problem? Is the model specification correct?
Ron Levine
Message was edited by: Ronald Levine:
Since I've been advised the the above code is correct for the Poisson with random effects model, there is another issue at hand: the large random effects variance (s2u=26) may be diminishing the mean estimation. (I tried the same model using PROC GLIMMIX and the estimation was not affected. Why? ) My question to the community is: Should we use a NegBin distribution instead of Poisson in PROC NLMIXED? Or, (since 92% of the count outcomes are zeros), should we use a ZIP or ZINB distribution instead? How would these alternative models be coded in PROC NLMIXED? Ron Levine
Hi Ron,
I would definitely consider ZIP or ZINB with that many zeroes. A good place to search for code to do this is in the SAS-L archives. Look for posts by Dale McLerran. There is an especially good one dated 14 April 2003.
Steve Denham
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.