stata - marginal effects options, margins versus irr -
i estimating poisson regression , want estimate economic significance of coefficients (marginal effects).
i have 3 methods have been suggested me:
- margins, dydx(_all)
- margins, dydx(_all) atmeans
- poisson, irr
i wondering method best use.
marginal effect @ mean (#2) bad idea since mean may correspond unrepresentative, nonsensical value, particularly if x contains categorical variables. care additive effect half female , 10 percent pregnant? not. me more commonly used when computations expensive. can use at() option pick more suitable values if want go route.
average marginal effect (#1) gives average additive effect on expected count.
the irr option (#3) gives multiplicative effect on mean.
here's simple example doctors data:
. use http://www.stata-press.com/data/r13/dollhill3, clear (doll , hill (1966)) . bys smokes: sum deaths ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -> smokes = 0 variable | obs mean std. dev. min max -------------+-------------------------------------------------------- deaths | 5 20.2 12.61745 2 31 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -> smokes = 1 variable | obs mean std. dev. min max -------------+-------------------------------------------------------- deaths | 5 126 70.52659 32 206 as can see, average number of deaths groups of smokers 126. non-smokers, it's 20.2.
irr:
. poisson deaths i.smokes, irr iteration 0: log likelihood = -136.6749 iteration 1: log likelihood = -136.56351 iteration 2: log likelihood = -136.56346 iteration 3: log likelihood = -136.56346 poisson regression number of obs = 10 lr chi2(1) = 426.21 prob > chi2 = 0.0000 log likelihood = -136.56346 pseudo r2 = 0.6094 ------------------------------------------------------------------------------ deaths | irr std. err. z p>|z| [95% conf. interval] -------------+---------------------------------------------------------------- 1.smokes | 6.237624 .66857 17.08 0.000 5.055737 7.695802 _cons | 20.2 2.009975 30.21 0.000 16.62087 24.54986 ------------------------------------------------------------------------------ the number of deaths smokers 6.237624*20.2=126.
now calculated additive effect:
. margins, dydx(smokes) conditional marginal effects number of obs = 10 model vce : oim expression : predicted number of events, predict() dy/dx w.r.t. : 1.smokes ------------------------------------------------------------------------------ | delta-method | dy/dx std. err. z p>|z| [95% conf. interval] -------------+---------------------------------------------------------------- 1.smokes | 105.8 5.407402 19.57 0.000 95.20169 116.3983 ------------------------------------------------------------------------------ note: dy/dx factor levels discrete change base level. this says smokers should have 105.8 more deaths non-smokers. 20.2+105.8=126.
in simple model, margins, dydx(smokes) atmeans give same answer. can see why?
Comments
Post a Comment