Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: From: Ankit Sakhuja <[email protected]>
From
Maarten Buis <[email protected]>
To
[email protected]
Subject
Re: st: From: Ankit Sakhuja <[email protected]>
Date
Fri, 24 Jan 2014 10:46:13 +0100
If you are interested in the odds ratios, than you could look at:
M.L. Buis (2012) "Stata tip 106: With or without reference", The Stata
Journal, 12(1), pp. 162-164.
Here is an example using -logit-:
*------------------ begin example ------------------
sysuse nlsw88, clear
gen byte black = race == 2 if race < 3
label variable black "race"
label define black 0 "white" ///
1 "black"
label value black black
gen byte goodjob = occupation < 3 if occupation < .
label variable goodjob `"respondent has a "good" job"'
label define goodjob 1 "profesional or managerial" ///
0 "other"
label value goodjob goodjob
logit union ibn.goodjob i.goodjob#i.collgrad i.black i.south, or
*------------------- end example -------------------
* (For more on examples I sent to the Statalist see:
* http://www.maartenbuis.nl/example_faq )
So, the odds ratio of collegegrad for those with a good job is 1.4 and
the odds ratio for those that don't have a good job is 2.4.
Hope this helps,
Maarten
On Fri, Jan 24, 2014 at 4:52 AM, <[email protected]> wrote:
> Dear Members,
>
> I am trying to understand the effect of interaction between two
> categorical variables in a model:
>
> Logistic DIED i.agegroup i.sex i.race i.procedure i.procedure#i.sex
>
> I can visualize the interaction effect using margins and margins plot as below:
>
> margins procedure#sex
> ------------------------------------------------------------------------------
> | Delta-method
> | Margin Std. Err. z P>|z| [95% Conf. Interval]
> -------------+----------------------------------------------------------------
> procedure#sex |
> 0 0 | .0960571 .0013119 73.22 0.000 .0934859 .0986284
> 0 1 | .1568595 .0082394 19.04 0.000 .1407106 .1730084
> 1 0 | .0462026 .0008488 54.43 0.000 .044539 .0478663
> 1 1 | .1160865 .0086644 13.40 0.000 .0991046 .1330684
> ------------------------------------------------------------------------------
> marginsplot
>
> However, I am not sure how to interpret the above table accurately
> (from my understanding it shows the % probability of mortality for
> each scenario) and how to find the odds ratios for mortality for the 2
> scenarios as below (I can find these ORs by stratifying the population
> into males and females & then running 2 separate regression but I am
> not sure if there is a way to get those using the interaction term in
> the full model):
> Males undergoing procedure in comparison to Males not undergoing procedure
> Females undergoing procedure in comparison to Females not undergoing procedure
>
> I would really appreciate your help.
> Thanks
> Ankit
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
--
---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany
http://www.maartenbuis.nl
---------------------------------
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/