Bookmark and Share

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]

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


From   Tirthankar Chakravarty <tirthankar.chakravarty@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Testing the difference between coefficients with interaction variables
Date   Fri, 26 Aug 2011 23:28:01 -0700

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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index