Date: Mon, 27 Oct 2008 09:32:52 -0700 Oliver.Kuss@MEDIZIN.UNI-HALLE.DE "SAS(r) Discussion" Oliver.Kuss@MEDIZIN.UNI-HALLE.DE http://groups.google.com Twelve procedures to do logistic regression in SAS To: sas-l@uga.edu text/plain; charset=ISO-8859-1

Hello all, I have been interested in the logistic regression model for some years now. As SAS was always my preferred statistical software, some SAS code to fit logistic regression models accumulated over the years. Actually I found 12 different SAS procedures (LOGISTIC, GENMOD, PROBIT, GAM, LIFEREG, GLIMMIX, QLIM, NLMIXED, NLIN, IML, MDC, PHREG) which were able to fit a simple logistic model.

I collected the codes and the data set on my website (http:// www.oliverkuss.de/science/software/Twelve_procedures_to_do_logistic_regression_in_SAS.sas)

The data set is from a project which I conducted with Dr. Stefan Rimbach from the Gynecology Department of the University of Heidelberg, Germany. The sample consisted of 162 women who wanted to become pregnant and were observed at the department. The response was pregnancy within the first 3 years of observation and the covariates were age at baseline (AGE), years of infertility at baseline (INFER), and a physiological tube defect (TUBPHYSD). All of the above mentioned procedures below do reproduce exactly the result from a simple maximum likelihood fit in terms of the parameter estimates and their standard errors, which are

Intercept 2.0117 (1.3734) AGE -0.0510 (0.0422) INFER -0.1409 (0.0791) TUBPHYSD -0.8880 (0.4284)

Though I certainly agree that PROC LOGISTIC is sufficient for most practical cases, some additional things can be learned from the other procedures. For example, PROC QLIM and PROC MDC have a number of R- Square-measures (note that PROC QLIM has the correct ones, because PROC MDC is maximizing a partial likelihood), PROC GENMOD, PROC LIFEREG, PROC GLIMMIX and PROC NLMIXED give additional information criteria, PROC PROBIT gives inverse probabilities, or it might be instructive to look at the actual fitting algorithm in PROC IML. PROC QLIM gives estimates of marginal effects and PROC NLMIXED allows the estimation of nonlinear contrasts. Finally, you can use PROC GENMOD (with the REPEATED statement) to get robust standard errors.

I am curious if you could find some more PROCs to do the job. For example, I did not succeed with the MODEL and the SURVEYLOGISTIC procedure.

Hope you enjoy it, Oliver

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