Statalist


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

st: stata code for linear odds model


From   Jay Kaufman <Jay_Kaufman@unc.edu>
To   Stata <statalist@hsphsun2.harvard.edu>
Subject   st: stata code for linear odds model
Date   Fri, 29 Aug 2008 13:23:00 -0400

A friend of mine just showed me a spiffy model and the accompanying SAS code.
The point is to estimate additive interaction of the odds ratio, something
that is of great interest in epidemiology because 1) we often work with odds
ratios because of case-control designs, and 2) we often want to assess interaction
on the additive scale rather than the multiplicative scale because of its
relevance for biologic synergism.  Standard logistic models, in contrast,
have interaction parameters that correspond to deviation from multiplicativity,
which is less etiologically relevant for us.

The model here is:

odds=exp(b0)(1+b1x1+b2x2+b3x1x2).

where odds(y) is pr(y=1)/pr(y=0), x1 is the exposure, x2 is the covariate, b0 is the
intercept b1 is the coefficient for x1, b2 is the coefficient for x2, and b3 is the
coefficient for the product interaction term x1*x2.

b3, under this model, has a very attractive interpretation for us as deviation from
additive interaction of x1 and x2.  The model is attractive because we can construct
tests and intervals for this parameter as a way of assessing additive interaction.

The SAS code is remarkably simple:

proc nlmixed data= ;
odds=exp(b0) * (1+ b1*x1 + b2*x2 + b3*x1*x2) ;
model outcome ~ binary( odds/(1+odds) );
run;

This seems pretty amazing to me.  SAS wants a distribution function
specified, but it doesn't seem to need a link function.  It recognizes
that x1 and x2 are in the data set, and then it estimates all the other
parameters with adaptive gaussian quadrature (you can, if you wish,
add options for deviating from the default number of quadrature points, etc.

So the question is simply how to run this sort of model in Stata.
I can't believe that SAS can do something that Stata can't do, but I
don't see how to do this in Stata.  Does anyone else?

Thanks so much.

- JK

--
Jay S. Kaufman, Ph.D
Associate Professor
-----------------------------
email: Jay_Kaufman@unc.edu
-----------------------------
Department of Epidemiology
UNC School of Public Health
2104C McGavran-Greenberg Hall
Pittsboro Street, CB#7435
Chapel Hill, NC 27599-7435
phone:  919-966-7435
fax:    919-966-2089
-----------------------------


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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