Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: logit with interaction and transformation


From   Maarten buis <[email protected]>
To   stata list <[email protected]>
Subject   RE: st: logit with interaction and transformation
Date   Fri, 31 Jul 2009 14:55:43 +0000 (GMT)

--- Pabst Alexander wrote:
> I'd like to estimate a logistic regression model with an interaction
> term between a continuous predictor (X1) and another but ln-transformed
> continuous predictor (X2)

The best way of making sense of such highly non-linear models is to 
graph the results:

*--------------------- begin example --------------------------------
sysuse nlsw88, clear
gen lngrade = ln(grade)
gen southXlngrade = south*lngrade
logit union lngrade south southXlngrade married never_married
adjust married = 1 never_married = 0, by(grade south) ci replace pr
twoway rarea lb ub grade if south == 0 || ///
       rarea lb ub grade if south == 1 || ///
       line pr grade if south == 0     || ///
       line pr grade if south == 1,       ///
       legend(order( 3 "Non-South"        ///
                     4 "South"))          ///
       ytitle("probability union worker")
*--------------------- end example ----------------------------------

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index