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 |
Tirthankar Chakravarty <tirthankar.chakravarty@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Testing the difference between coefficients with interaction variables |

Date |
Sat, 27 Aug 2011 00:33:05 -0700 |

Note that this time, you are testing the hypothesis that the change in coefficient on "mpg", as you move from the base category to any of the other categories of "rep78" is the same (possibly non-zero). This is a slightly different hypothesis than the one you initially stated. Note also that it does not make sense to compare the coefficient on "mpg" with the coefficient on any of the interaction terms, as the coefficients represent differential effects over and above the base effect. T On Sat, Aug 27, 2011 at 12:10 AM, Tirthankar Chakravarty <tirthankar.chakravarty@gmail.com> wrote: > Add the "equal" option: > > /****************************/ > sysuse auto, clear > regress price c.mpg##i.rep78 > testparm c.mpg#i.rep78, equal > /****************************/ > > T > > On Sat, Aug 27, 2011 at 12:04 AM, Michael Crain <michaelcrain@ymail.com> wrote: >> Yes, I see this is testing for differences between the base group >> compared to each of the other groups: >> >> base group - group 2 = 0 >> base group - group 3 = 0 >> etc. >> >> I am trying to test not only base group - group 2 = 0, >> but also: group 2 - group 3 = 0 >> >> Can examining coefficients between groups other than the base group be >> done in a straightforward way? >> >> >> --- On Sat, 8/27/11, Tirthankar Chakravarty <tirthankar.chakravarty@gmail.com> wrote: >> >>> From: Tirthankar Chakravarty <tirthankar.chakravarty@gmail.com> >>> Subject: Re: st: Testing the difference between coefficients with interaction variables >>> To: statalist@hsphsun2.harvard.edu >>> Date: Saturday, August 27, 2011, 2:28 AM >>> Here is an example: >>> >>> /****************************/ >>> sysuse auto, clear >>> regress price c.mpg##i.rep78 >>> testparm c.mpg#i.rep78 >>> /****************************/ >>> >>> This tests whether or not the coefficient on "mpg" is >>> significantly >>> different across categories of "rep78". In this case, you >>> are unable >>> to reject the hypothesis that they are indistinguishable >>> from the >>> coefficient of "mpg" for the base group. >>> >>> T >>> >>> On Fri, Aug 26, 2011 at 11:12 PM, Michael Crain <michaelcrain@ymail.com> >>> wrote: >>> > I know testing the difference between coefficients of >>> variables is >>> > straightforward: >>> > >>> > reg y x1 x2 x3 >>> > test x1 = x2 = x3 >>> > >>> > Is the test as straightforward for examining >>> coefficients in models >>> > with interactions variables? >>> > >>> > reg y x1 x2 x3 x1*x2 x1*x3 >>> > >>> > where: >>> > >>> > x2 and x3 are dummy variables that identify >>> groups >>> > >>> > the base group is when x2=0 and x3=0, group 2 >>> > is when x2=1 and x3=0, group 3 is when x2=0 and >>> x3=1 >>> > >>> > I am interpreting the effect of the base group as x1's >>> coefficient. The >>> > effect of group 2 is the sum of coefficients of the x1 >>> and x1*x2 >>> > variables. Lastly, the effect of group 3 is the sum of >>> coefficients of >>> > the x1 and x1*x3 variables. >>> > >>> > Now, I want to examine whether the effects of the >>> three groups are >>> > different. >>> > >>> > Is the test: >>> > >>> > test x1 = x1*x2 = x1*x3 >>> > >>> > * >>> > * 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/ >>> > >>> >>> >>> >>> -- >>> Tirthankar Chakravarty >>> tchakravarty@ucsd.edu >>> tirthankar.chakravarty@gmail.com >>> >>> * >>> * 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/ >> > > > > -- > Tirthankar Chakravarty > tchakravarty@ucsd.edu > tirthankar.chakravarty@gmail.com > -- Tirthankar Chakravarty tchakravarty@ucsd.edu tirthankar.chakravarty@gmail.com * * 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/

**References**:**Re: st: Testing the difference between coefficients with interaction variables***From:*Tirthankar Chakravarty <tirthankar.chakravarty@gmail.com>

**Re: st: Testing the difference between coefficients with interaction variables***From:*Michael Crain <michaelcrain@ymail.com>

**Re: st: Testing the difference between coefficients with interaction variables***From:*Tirthankar Chakravarty <tirthankar.chakravarty@gmail.com>

- Prev by Date:
**Re: st: Testing the difference between coefficients with interaction variables** - Next by Date:
**st: e(wexp) versus e(wexp): different routines return different things** - Previous by thread:
**Re: st: Testing the difference between coefficients with interaction variables** - Next by thread:
**Re: st: Testing the difference between coefficients with interaction variables** - Index(es):