Hey,
I'm using sas and r to perform a glm with poisson distribution. I get the exact same estimates of the coeffs but very different degress och freedom and chisq.
ods output ParameterEstimates=pe;
proc genmod data=input;
logoffset=log(offset);
model count = /dist = poisson
link=log
offset=logoffset;
run;
R:
glm(count ~ offset(logoffset), family = poisson)
Cant find anything about yates correction in sas proc genmod. Ideas?
Your GENMOD code uses the LOGOFFSET variable twice in the model, once as a predictor and then again as an offset (which is also a predictor with parameter estimate restricted to 1). If your purpose is to fit an intercept-only model with an offset, then remove LOGOFFSET prior to the slash (/) to remove it as a redundant predictor from the model.
If you are referring to the continuity correction attributed to Yates, see the several options for continuity correction discussed in the description of the TABLES statement in the PROC FREQ documentation. From your code, it seems likely that you are trying to test a binomial proportion, so the BINOMIAL(CORRECT) option might be what you are looking for.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.