Bookmark and Share

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: cascading dummies


From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: cascading dummies
Date   Tue, 2 Oct 2012 09:59:17 +0200

On Tue, Oct 2, 2012 at 1:18 AM, Shikha Sinha wrote:
> You and also STB  mentioned that coeff in regression using ordinal
> dummies can be constructed by subtracting the coeff from the
> regression using the standard dummies. Is this true for non-linear
> regression as well (Logit, probit)?
<snip>
> Does the odds ratios of 1.397527 mean that an increase in the dummy
> from 3 to 4 results in 39% increase in literacy?

I would do this type of analysis with -contrasts- command. Below is an
example that deals with the comparison of -cascade- and -constrast-,
the interpretation, and its use in a -logit- model.

*--------------------- begin example ----------------------
//========================== prepare data
sysuse nlsw88, clear
gen byte ed = cond(grade  < 12, 1,        ///
              cond(grade == 12, 2,        ///
              cond(grade  < 16, 3,        ///
              cond(grade  < . , 4, .))))
label define ed 1 "less than high school" ///
                2 "high school"           ///
                3 "some college"          ///
                4 "college"
label value ed ed

// =============== interpret "normal" coefficients

// estimate model
reg wage i.ed

// This gives the mean wages for each category
margins ed

// The constant is the mean wage of less than high school:
di _b[_cons]

// The coefficient of 2.ed is the difference between
// less than high school and high school, that is
// the constant + 2.ed = the mean wage of 2.ed:
di _b[_cons] + _b[2.ed]

//=============== -cascade- is superceded by -constrast-
// -cascade-
cascade ed if ed < ., gen(foo)
reg wage foo*

// -contrast-
reg wage i.ed
contrast ar.ed

// =================== interpretation of these contasts
// get the mean wages within each eductional category
margins ed, post

// first contrast is difference in mean wage between
// less than highschool and highschool:
di _b[2.ed] - _b[1.ed]

// second contrast is difference in mean wage between
// highschool and some college:
di _b[3.ed] - _b[2.ed]

// third contrast is difference in mean wage between
// some college and college:
di _b[4.ed] - _b[3.ed]

// I do these computations to show that we do not need
// to do them, the results are already given in the
// output of -contrast-

// ====================== non-linear model
gen byte good_job = occupation < 3 if occupation < .
logit good_job i.ed, or

// get the contrasts
contrast ar.ed, eform

// get the odds
margins i.ed, expression(exp(xb())) post

// first contrast is the ratio of the odds for less
// than high school and highschool
di _b[2.ed]/_b[1.ed]

// second contrast is the ratio of the odds for
// high school and some college
di _b[3.ed]/_b[2.ed]

// third contrast is the ratio of the odds for
// some college and college
di _b[4.ed]/_b[3.ed]
*---------------------- 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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index