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: odds ratios and confidence intervals after mlogit with a dummy X
From
Maarten Buis <[email protected]>
To
[email protected]
Subject
Re: st: odds ratios and confidence intervals after mlogit with a dummy X
Date
Wed, 6 Mar 2013 09:43:37 +0100
On Wed, Mar 6, 2013 at 2:48 AM, Jeremy Reynolds wrote:
> If I want to get the odds ratio of foreign for values of price (rather
> than the odds ratios of price for foreign cars) <snip>
> I'm not sure, however, how to replicate these results (primarily the
> first one) with mlogit.
*------------------ begin example ------------------
sysuse auto, clear
recode rep78 1/2=3
replace weight = (weight -3000) / 2000
replace price = (price - 6000) / 1000
mlogit rep78 c.price##i.foreign weight, rrr
est store base
// OR of foreign for 1 unit increase in price
lincom _b[4:1.foreign] + _b[4:1.foreign#c.price], rrr
// reproduce those estimates with -mlogit-
// it is the main effect of foreign
gen price1 = price - 1
mlogit rep78 c.price1##i.foreign weight, rrr
// OR of foreign for 2 unit increase in price
est restore base // return to our original -mlogit- model
lincom _b[4:1.foreign] + 2*_b[4:1.foreign#c.price], rrr
di 27.88998 * 1.788271^2 // same result as lincom 89.189734
// reproduce those estimates with -mlogit-
// it is the main effect of foreign
gen price2 = price - 2
mlogit rep78 c.price2##i.foreign weight, rrr
*------------------- end example -------------------
(For more on examples I sent to the Statalist see:
http://www.maartenbuis.nl/example_faq )
Hope this helps,
Maarten
---------------------------------
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/