Statalist


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

Re: AW: AW: st: logit with interaction and transformation


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: AW: AW: st: logit with interaction and transformation
Date   Mon, 3 Aug 2009 15:50:57 +0000 (GMT)

You are making life very complicated for yourself and your 
audience: your odds ratio will now depend on at what value 
of wage and at what value of grade you evaluate your 
equation. So you will need to present a two-dimensional 
table to accurately display the effect-size. 

The computation is in principle not hard, but it is very 
easy to get confused. It is just a matter of writing down 
the equation and go step by step through the logic of an 
interaction effect. However, I am in a hotel right now, so 
I don't have access to my whiteboard, so I will not even 
attempt to solve that problem.   

I would just present the graphs I gave you in my first 
post, they are going to be a much clearer presentation of 
your results than the two-dimensional table you would 
need to produce if you want to present them numerically.

Hope this helps,
Maarten

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

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


--- On Mon, 3/8/09, Pabst Alexander <[email protected]> wrote:

> From: Pabst Alexander <[email protected]>
> Subject: AW: AW: st: logit with interaction and transformation
> To: [email protected]
> Date: Monday, 3 August, 2009, 12:52 PM
> Great. This is a step closer to the
> solution.
> 
> But I actually want the odds ratios of the (ln transformed)
> independent variable at different values of the
> (non-transformed) moderator, i.e. just the other way
> around.
> To stay at your example, that would mean want I want the
> odds ratios of grade when at different values of wage. Would
> it then read like this below?
> But this yields big ORs, so I assume there`s still a
> mistake in!? 
> 
> Alex
> 
> *--------------------- begin example ------------------
> gen lngrade = ln(grade) 
> gen wageXlngrade = wage*lngrade 
> 
> logit union lngrade wage wageXlngrade married
> never_married, or
> 
> sum wage if e(sample)
> global m = r(mean)
> global sd = r(sd)
> 
> nlcom (mean_minus_1sd:         
>                
>        ///
>           exp( (exp(_b[lngrade]))
> +            
> ///
>            
> ($m-$sd)*_b[wageXlngrade] )
> )       ///
>       (mean:       
>                
>            
>        ///
>           exp( (exp(_b[lngrade]))
> +           
>     ///
>            
> ($m)*_b[wageXlngrade] ) )       
>     ///
>       (mean_plus_1sd:     
>                
>             ///
>           exp( (exp(_b[lngrade]))
> +            
> ///
>            
> ($m+$sd)*_b[wageXlngrade] ) )
> *--------------------- end example --------------------
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]]
> Im Auftrag von Maarten buis
> Gesendet: Montag, 3. August 2009 13:03
> An: [email protected]
> Betreff: Re: AW: st: logit with interaction and
> transformation
> 
> 
> --- On Mon, 3/8/09, Pabst Alexander wrote:
> > 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)?
>  
> None of these would be correct. Apparently (in terms of the
> 
> example below) you want the odds ratios of south when at 
> different values of grade. Below I picked the numbers 
> mean grade - 1 sd, mean grade, and mean + 1 sd. Notice that
> 
> I used the mean and standard deviation of grade and only 
> later transformed it into ln(grade), as this way your 
> interpretation will accept the unit of measurement of grade
> 
> rather than ln(grade).
> 
> *--------------------- begin example ------------------
> sysuse nlsw88, clear
> gen lngrade = ln(grade)
> gen southXlngrade = south*lngrade
> logit union lngrade south southXlngrade ///
>             married
> never_married, or
> 
> sum grade if e(sample)
> local m = r(mean)
> local sd = r(sd)
> 
> nlcom (mean_minus_1sd:         
>                
>    ///
>           exp( _b[south] + 
>                
>        ///
>              
> ln(`m'-`sd')*_b[southXlngrade] ) )   ///
>       (mean:       
>                
>            
>    ///
>           exp( _b[south] + 
>                
>        ///
>              
> ln(`m')*_b[southXlngrade] ) )       
> ///
>       (mean_plus_1sd:     
>                
>         ///
>           exp( _b[south] + 
>                
>        ///
>              
> ln(`m'+`sd')*_b[southXlngrade] ) ) 
> 
> *--------------------- 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/
> 


      

*
*   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