Programming the statistical procedures from SAS

Logistic Regression > Differencce Between Proc LOGISTIC and GENMOD

Reply
Occasional Learner
Posts: 1

Logistic Regression > Differencce Between Proc LOGISTIC and GENMOD

I've been trying to replicate the results of a logistic regression programmed using Proc LOGISTIC with GENMOD. I believe the options and model specification are the same but some of my parameter estimates are differing around the 4th decimal. The code using Proc LOGISTIC is:

 

proc logistic data = mydata descending;

  class treat (param = ref ref = "A") country / param = glm;

  model resp = treat country var1;

run;

 

Code for Proc GENMOD is:

 

proc genmod data = mydata descending;

  class treat (param = ref ref = "A") country / param = glm;

  model resp = treat country var1 / dist = bin link = logit;

run;

 

Is there any reason why the results would differ using the above code? I'm using SAS v9.4.

 

Thanks

 

SAS Super FREQ
Posts: 3,307

Re: Logistic Regression > Differencce Between Proc LOGISTIC and GENMOD

They use different algorithms to maximize the likelihood, so you might not be able to get an exact match.  BY default, PROC LOGISTIC uses a Fisher scoring algorithm, whereas GENOMD uses a ridge-stabilized Newton-Raphson algorithm.  You could try setting TECHNIQUE=NEWTON in the MODEL statement for PROC LOGISTIC.

 

Another difference is that GENMOD estimates a scale parameter. You could try using the NOSCALE option and see if that helps.

 

Personally, I wouldn't worry much about differences in the fourth decimal place, since that is probably much smaller than the standard errors.

Ask a Question
Discussion stats
  • 1 reply
  • 152 views
  • 0 likes
  • 2 in conversation