Hi Maarten,
thanks a lot, this is really helpful.
But just for the case: would it be correct to calculate either
Y= X1 + (ln)X2 + X1*(ln)X2
sum X1
global m = r(mean)
global sd = r(sd)
(1) nlcom exp(x2) + ($m+$sd)*X2*X1
or (2) nlcom exp(x2) + exp(($m+$sd)*X2*X1)
Or would I have to manage this somehow in terms of marginal effects, e.g.
mfx, eydx at(X1=$m)?
Thanks again,
Alex
-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von Maarten buis
Gesendet: Freitag, 31. Juli 2009 16:56
An: stata list
Betreff: RE: st: logit with interaction and transformation
--- 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/
*
* 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/