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]

From |
Steven Samuels <sjsamuels@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Obtaining 95%CI for marginal effect |

Date |
Sun, 6 Feb 2011 11:08:13 -0500 |

xi: svy: reg mpg weight i.foreign i.rep78 // adjust to rep78=3

Steve On Feb 6, 2011, at 9:59 AM, Nur Hafidha Hikmayani wrote: Thanks Steve. I'm afraid however that I'm not clear enough when some independent variables are categorical. You gave an example in which weight and turn are numerical variables - in my case, there is only 1 numerical IV. Suppose foreign is the main IV of interest and other covariates are mostly categorical, can we use -adjust- too (perhaps with -svy:prop- beforehand instead)? hafida-

Nur-I apologize. I checked and discovered -adjust- after -svy: reg- doesnotcompute predictions at the weighted means of the covariates, only attheunweighted means. As a work-around, you could substitute theweighted meansby hand. **************************** sysuse auto, clear drop if rep78==. svyset rep78 [pw=head] svy: mean weight turn //get survey weighted means xi: svy: reg mpg weight turn i.foreign adjust weight= 3138.575 turn=40.33816, by(foreign) ci se ***************************** Steve sjsamuels@gmail.com Nur-Use -adjust- with the -ci- option. The fitted value of y is not a"marginaleffect"; for -regress- or (-svy: regress-) the default marginaleffects arethe regression coefficients. ********************* sysuse auto, clear xi: reg weight price turn i.foreign adjust price turn, by(foreign), se ci ****************** Steve sjsamuels@gmail.com On Feb 6, 2011, at 7:02 AM, Nur Hafidha Hikmayani wrote: Dear all, I've been running some regression models using -svy- and estimating its marginal effect using -mfx- (I use Stata 10.1). I wonder how can I get the 95% CI for the marginal effects (y)? The output for regression and its marginal effect are as follows: . xi: svy: reg GH i.medgrp exgrp chronic nummed gp ------------------------------------------------------------------------------ | LinearizedGH | Coef. Std. Err. t P>|t| [95% Conf.Interval]-------------+----------------------------------------------------------------_Imedgrp_1 | 4.429839 3.56263 1.24 0.214 -2.56462811.42431_Imedgrp_2 | 8.333728 3.633545 2.29 0.022 1.20003515.46742_Imedgrp_3 | 10.05818 3.773961 2.67 0.008 2.64881317.46755exgrp | -8.916839 1.89046 -4.72 0.000 -12.62835-5.205324chronic | -10.31767 1.936802 -5.33 0.000 -14.12017-6.515169nummed | -1.063043 .3452676 -3.08 0.002 -1.740902 -.3851831gp | -4.347845 1.773649 -2.45 0.014 -7.830027 -.865663_cons | 83.19335 3.520136 23.63 0.000 76.2823190.10438------------------------------------------------------------------------------ . mfx, at(mean _Imedgrp_1=0 _Imedgrp_2=0) Marginal effects after svy:regress y = Fitted values (predict) = 53.085624 ------------------------------------------------------------------------------variable | dy/dx Std. Err. z P>|z| [ 95%C.I. ] X---------+--------------------------------------------------------------------_Imedg~1*| 4.429839 3.56263 1.24 0.214 -2.55279 11.4125 0 _Imedg~2*| 8.333728 3.63354 2.29 0.022 1.21211 15.4553 .379185 _Imedg~3*| 10.05818 3.77396 2.67 0.008 2.66136 17.455 0exgrp*| -8.916839 1.89046 -4.72 0.000 -12.6221 -5.21161 .762312chronic*| -10.31767 1.9368 -5.33 0.000 -14.1137 -6.52161 .83752nummed | -1.063043 .34527 -3.08 0.002 -1.73975 -.3863316.69376gp*| -4.347845 1.77365 -2.45 0.014 -7.82413 -.871558 .472814------------------------------------------------------------------------------ (*) dy/dx is for discrete change of dummy variable from 0 to 1 Any help is much appreciated, Thanks, hafida- * * 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/ * * 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/

**Follow-Ups**:**Re: st: Obtaining 95%CI for marginal effect***From:*Nur Hafidha Hikmayani <nhhikmayani@gmail.com>

**References**:**st: Obtaining 95%CI for marginal effect***From:*Nur Hafidha Hikmayani <nhhikmayani@gmail.com>

**Re: st: Obtaining 95%CI for marginal effect***From:*Steven Samuels <sjsamuels@gmail.com>

**Re: st: Obtaining 95%CI for marginal effect***From:*Nur Hafidha Hikmayani <nhhikmayani@gmail.com>

- Prev by Date:
**Re: st: Obtaining 95%CI for marginal effect** - Next by Date:
**Re: st: bootstrap saving option** - Previous by thread:
**Re: st: Obtaining 95%CI for marginal effect** - Next by thread:
**Re: st: Obtaining 95%CI for marginal effect** - Index(es):