Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: SAS versus Stata, Panel Study Logit models


From   Richard Williams <Richard.A.Williams.5@ND.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: SAS versus Stata, Panel Study Logit models
Date   Wed, 19 Dec 2007 10:52:25 -0500

A student of mine has used SAS to estimate various panel study logistic regressions. I can perfectly replicate her regular logistic regression results using -logit-, but I am having a few problems replicating her panel analysis. A couple of Qs (which may or may not be answerable if you don't also know SAS):

* She uses "Alternating Logistic Regression" for part of the analysis. Is that possible in Stata (perhaps it goes by a different name)?

* She also uses GEE with unstructured correlations. I come very close but not quite to replicating her results with -xtgee- and with -xtlogit-. Is it reasonable to think that differences in algorithms might produce small differences in results? Or is SAS perhaps using some kind of different defaults or methods than Stata uses? And if so could I specify the necessary changes in Stata, e.g. change the tolerances or the maximization technique? I'm guessing the differences are just due to algorithms but it is always possible there is something more than that.

Specifically, I give commands like

xtlogit drug age white black hispanic male modal2 severity time gentime modtime sevtime, corr(uns) pa
xtgee drug age white black hispanic male modal2 severity time gentime modtime sevtime, corr(uns) fam(binom) link(logit)

Here is some of her SAS code, which is for a slightly different model but I believe similar code was used for the final models:

PROC GENMOD data=Drug descending;
CLASS id2 time2 race modal;
MODEL drug= modal severity time modal*time severity*time/ dist=binomial
link=logit;
REPEATED subject=id2 / withinsubject=time2 type=un covb corrw modelse;
RUN;

I hate it when students know more than I do. :) Thanks for any help.

-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME: (574)289-5227
EMAIL: Richard.A.Williams.5@ND.Edu
WWW: http://www.nd.edu/~rwilliam

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index