Gamma regression R GLM vs SAS GENMOD

592 views Asked by At

I am trying to replicate gamma regression that I have in SAS with R. Unfortunately, I get completely different parameter estimation and I do not have any idea what could cause that. I was looking for answer to my problem on SO but I didn't find anything that cover it.

My SAS code is:

proc genmod data=data;
class var1 factor1 ;
Make 'Obstats' Out=Outdata_G;
model answer = var2 factor1 var3/
offset= offset dist=Gamma link=log obstats;
run;

I see that the var1 is used in class statement, but isn't used in model statement - can it change the results? (I cannot rerun the code).

What I've done in R is:

glm(answer~var2+factor1+var3, data =(data), offset = offset, family = Gamma(link = "log"))

What could cause differences in results from those two pices of code?

Thanks in advance!

0

There are 0 answers