Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Mario Jose <mariojose276@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: comparing equality of coefficients from two subsamples |

Date |
Wed, 20 Feb 2013 22:10:42 +0000 |

Thank you Rebecca for the links, they were very useful to understand the previous Jay's comment. I have implemented the strategy of Bill Gould (allowing for different variances), but it appeared the message of error "weight must be constant within id"... Anyway I do not want to introduce interactions with all independent variables but to only one. Below I expose what the specific problem I have. I have a panel sample of firms, and in the middle of the period (2004) it was implemented by the government a specific fiscal measure. I want to test whether this measure had impacts on the profits reported by firms. As I think that the measure had impacts in a specific subsample of firms, I divided the sample in two subsamples - group1 group2 (splitted according the debt/assets ratio of firms). I run the model for the two groups separately: xtreg, Y x1 control1 control2 ... i.pos i.pos#c.x1 if group==1, fe xtreg, Y x1 control1 control2 ... i.pos i.pos#c.x1 if group==2, fe. (pos is binary taking value 1 for years after the implementation of the policy) and I obtain the following estimates for group 1 and 2, respectively: *******output excerpt************ ----------------------------------------------------------------------------------- | Robust Y | Coef. Std. Err. t P>|t| [95% Conf. Interval] ------------------+---------------------------------------------------------------- x1 | -2.053274 .5641935 -3.64 0.000 -3.159248 -.9473006 control1 | .5904103 .0267907 22.04 0.000 .5378933 .6429273 control2 | .0947558 .0233539 4.06 0.000 .0489758 .1405358 ... | -.0234459 .2617354 -0.09 0.929 -.5365189 .4896271 year dum.. | 1.pos | -.5814072 .1512517 -3.84 0.000 -.877902 -.2849124 1.pos#c.x1 | 1.256448 .4183398 3.00 0.003 .4363875 2.076508 _cons | -6.099231 1.766059 -3.45 0.001 -9.561191 -2.637272 ------------------+---------------------------------------------------------------- sigma_u | 2.1744991 sigma_e | .77651905 rho | .88690051 (fraction of variance due to u_i) ----------------------------------------------------------------------------------- ----------------------------------------------------------------------------------- | Robust Y | Coef. Std. Err. t P>|t| [95% Conf. Interval] ------------------+---------------------------------------------------------------- x1 | -2.047585 .6997248 -2.93 0.003 -3.41921 -.6759593 control1 | .4552402 .0232387 19.59 0.000 .4096868 .5007936 control2 | .028412 .0110095 2.58 0.010 .0068306 .0499933 ... year dum .. | 1.pos | -.4291118 .1817098 -2.36 0.018 -.7853059 -.072917 1.pos#c.x1 |.6220617 .5078439 1.22 0.221 -.3734318 1.617555 cons | -7.341474 1.606579 -4.57 0.000 -10.49075 -4.192201 ------------------+---------------------------------------------------------------- sigma_u | 2.4369753 sigma_e | .70849863 rho | .92206421 (fraction of variance due to u_i) ----------------------------------------------------------------------------------- **********end of excerpt************* These results are in the direction of the predicted, but when I pooled the sample for me to compare the coefs, the estimates appear to be significantly different. They are as follows: *******output excerpt************ -------------------------------------------------------------------------------------------------- | Robust Y | Coef. Std. Err. t P>|t| [95% Conf. Interval] ---------------------------------+---------------------------------------------------------------- x1 | -1.601963 .5324727 -3.01 0.003 -2.645681 -.5582453 control1 | .5435240 .0232387 19.59 0.000 .4096868 .5007936 control2 | .03976 .0110095 2.58 0.010 .0068306 .0499933 ... | year dum .. | 1.pos | -.382873 .1487651 -2.57 0.010 -.6744726 -.0912734 pos#c.x1 | .5273469 .4331443 1.22 0.223 -.3216739 1.376368 1.group | .2575 .175552 1.47 0.142 -.0866054 .60 1.group#c.x1 | -.8550352 .5470408 -1.56 0.118 -1.927308 .217238 1.group#pos | -.2539677 .1681945 -1.51 0.131 -.5836514 .075716 1.goup#pos#c.x1 | .8948809 .528096 1.69 0.090 -.140258 1.93002 _cons | -6.485282 1.161574 -5.58 0.000 -8.762123 -4.208441 ---------------------------------+---------------------------------------------------------------- sigma_u | 2.2954577 sigma_e | .76123454 rho | .90092029 (fraction of variance due to u_i) **********end of excerpt************* Do you find something wrong with the last equation? I would appreciate any help. Best MJ 2013/2/20 Rebecca Pope <rebecca.a.pope@gmail.com>: > Jay has given you important advice as it pertains to the group > residual variances. > You are correct that Wooldridge gives an explanation of interaction > terms. He also notes that a fully interacted model (as I assume you > will be estimating since your initial post seemed to suggest that you > expect different coefficients for all covariates for males and > females) assumes group error homogeneity (pg 245 of the 4th ed). > Unfortunately, there doesn't appear to be any discussion, at least in > that section, of how to address heteroskedasticity between the groups. > I didn't read through the rest of the book > You might want to take a look at this FAQ by Bill Gould: > http://www.stata.com/support/faqs/statistics/pooling-data-and-chow-tests/ > > And these slides from a talk by Bobby Gutierrez: > http://www.stata.com/meeting/fnasug08/gutierrez.pdf > > Only you can see your data and judge whether the constrained variance > model is appropriate or not. I wouldn't just dismiss the issue out of > hand though. > > Rebecca > > On Wed, Feb 20, 2013 at 5:47 AM, Mario Jose <mariojose276@gmail.com> wrote: >> Thanks you for comments. Testing for equality of coefficients from >> different subsamples, as suggested by Marteen, can be solved by >> interactions. >> There is an excellent explanation of the procedure in Wooldridge: >> Introd.Econometrics ModernApproach; pp. 243-246 and pp. 449-450 and in >> the following link: >> http://www.stata.com/support/faqs/statistics/chow-tests/ >> >> Best, >> MJ >> >> 2013/2/18 JVerkuilen (Gmail) <jvverkuilen@gmail.com>: >>> As someone else indicated, your syntax is odd. >>> >>> The main question I have is whether you want to allow for different >>> group residual variances. If not, interaction. If so, then I guess the >>> easiest approach would be -suest-. >>> >>> On Mon, Feb 18, 2013 at 11:15 AM, Mario Jose <mariojose276@gmail.com> wrote: >>>> Dear Statalisters, >>>> >>>> I have tryed to solve the question below, searching for help in the >>>> Stata Archiv without too much success... >>>> >>>> I have estimated a fixed effects linear regression for two different >>>> groups on my sample (say, sex male/female), using this strategy: >>>> xtreg dv iv, if sex==male >>>> xtreg dv iv, if sex==female >>>> >>>> I am interested in testing whether or not the coefficient b1 is >>>> identical to each other in the two subsamples. >>>> >>>> I would really appreciate any help. >>>> Regards >>>> MJ >>>> * >>>> * 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/ >>> >>> >>> >>> -- >>> JVVerkuilen, PhD >>> jvverkuilen@gmail.com >>> >>> http://lesswrong.com/ >>> >>> "Everybody loves progress but nobody likes change." ---Fortune cookie, 1/13/13. >>> * >>> * 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/ >> >> 2013/2/18 JVerkuilen (Gmail) <jvverkuilen@gmail.com>: >>> As someone else indicated, your syntax is odd. >>> >>> The main question I have is whether you want to allow for different >>> group residual variances. If not, interaction. If so, then I guess the >>> easiest approach would be -suest-. >>> >>> On Mon, Feb 18, 2013 at 11:15 AM, Mario Jose <mariojose276@gmail.com> wrote: >>>> Dear Statalisters, >>>> >>>> I have tryed to solve the question below, searching for help in the >>>> Stata Archiv without too much success... >>>> >>>> I have estimated a fixed effects linear regression for two different >>>> groups on my sample (say, sex male/female), using this strategy: >>>> xtreg dv iv, if sex==male >>>> xtreg dv iv, if sex==female >>>> >>>> I am interested in testing whether or not the coefficient b1 is >>>> identical to each other in the two subsamples. >>>> >>>> I would really appreciate any help. >>>> Regards >>>> MJ >>>> * >>>> * 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/ >>> >>> >>> >>> -- >>> JVVerkuilen, PhD >>> jvverkuilen@gmail.com >>> >>> http://lesswrong.com/ >>> >>> "Everybody loves progress but nobody likes change." ---Fortune cookie, 1/13/13. >>> * >>> * 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/ >> * >> * 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/ > > > > On Wed, Feb 20, 2013 at 5:47 AM, Mario Jose <mariojose276@gmail.com> wrote: >> Thanks you for comments. Testing for equality of coefficients from >> different subsamples, as suggested by Marteen, can be solved by >> interactions. >> There is an excellent explanation of the procedure in Wooldridge: >> Introd.Econometrics ModernApproach; pp. 243-246 and pp. 449-450 and in >> the following link: >> http://www.stata.com/support/faqs/statistics/chow-tests/ >> >> Best, >> MJ >> >> 2013/2/18 JVerkuilen (Gmail) <jvverkuilen@gmail.com>: >>> As someone else indicated, your syntax is odd. >>> >>> The main question I have is whether you want to allow for different >>> group residual variances. If not, interaction. If so, then I guess the >>> easiest approach would be -suest-. >>> >>> On Mon, Feb 18, 2013 at 11:15 AM, Mario Jose <mariojose276@gmail.com> wrote: >>>> Dear Statalisters, >>>> >>>> I have tryed to solve the question below, searching for help in the >>>> Stata Archiv without too much success... >>>> >>>> I have estimated a fixed effects linear regression for two different >>>> groups on my sample (say, sex male/female), using this strategy: >>>> xtreg dv iv, if sex==male >>>> xtreg dv iv, if sex==female >>>> >>>> I am interested in testing whether or not the coefficient b1 is >>>> identical to each other in the two subsamples. >>>> >>>> I would really appreciate any help. >>>> Regards >>>> MJ >>>> * >>>> * 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/ >>> >>> >>> >>> -- >>> JVVerkuilen, PhD >>> jvverkuilen@gmail.com >>> >>> http://lesswrong.com/ >>> >>> "Everybody loves progress but nobody likes change." ---Fortune cookie, 1/13/13. >>> * >>> * 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/ >> >> 2013/2/18 JVerkuilen (Gmail) <jvverkuilen@gmail.com>: >>> As someone else indicated, your syntax is odd. >>> >>> The main question I have is whether you want to allow for different >>> group residual variances. If not, interaction. If so, then I guess the >>> easiest approach would be -suest-. >>> >>> On Mon, Feb 18, 2013 at 11:15 AM, Mario Jose <mariojose276@gmail.com> wrote: >>>> Dear Statalisters, >>>> >>>> I have tryed to solve the question below, searching for help in the >>>> Stata Archiv without too much success... >>>> >>>> I have estimated a fixed effects linear regression for two different >>>> groups on my sample (say, sex male/female), using this strategy: >>>> xtreg dv iv, if sex==male >>>> xtreg dv iv, if sex==female >>>> >>>> I am interested in testing whether or not the coefficient b1 is >>>> identical to each other in the two subsamples. >>>> >>>> I would really appreciate any help. >>>> Regards >>>> MJ >>>> * >>>> * 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/ >>> >>> >>> >>> -- >>> JVVerkuilen, PhD >>> jvverkuilen@gmail.com >>> >>> http://lesswrong.com/ >>> >>> "Everybody loves progress but nobody likes change." ---Fortune cookie, 1/13/13. >>> * >>> * 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/ >> * >> * 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/ > * > * 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/ * * 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/

**Follow-Ups**:**Re: st: comparing equality of coefficients from two subsamples***From:*Rebecca Pope <rebecca.a.pope@gmail.com>

**References**:**st: comparing equality of coefficients from two subsamples***From:*Mario Jose <mariojose276@gmail.com>

**Re: st: comparing equality of coefficients from two subsamples***From:*"JVerkuilen (Gmail)" <jvverkuilen@gmail.com>

**Re: st: comparing equality of coefficients from two subsamples***From:*Mario Jose <mariojose276@gmail.com>

**Re: st: comparing equality of coefficients from two subsamples***From:*Rebecca Pope <rebecca.a.pope@gmail.com>

- Prev by Date:
**Re: st: Does anyone knows how to display t-statistics value?** - Next by Date:
**st: covariates predicting multiple outcomes in survival analysis** - Previous by thread:
**Re: st: comparing equality of coefficients from two subsamples** - Next by thread:
**Re: st: comparing equality of coefficients from two subsamples** - Index(es):