Bookmark and Share

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]

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


From   Tirthankar Chakravarty <[email protected]>
To   [email protected]
Subject   Re: st: Testing the difference between coefficients with interaction variables
Date   Sat, 27 Aug 2011 04:21:44 -0700

I suppose, but there is algebraically and statistically no difference
between this and

testparm c.mpg#i.rep78

Try it for yourself, keeping in mind the redundancy requirement

sysuse auto, clear
regress price c.mpg##i.rep78
testparm c.mpg#i.rep78

test mpg=(mpg+c.mpg#2.rep78)
test mpg=(mpg+c.mpg#3.rep78), accum
test mpg=(mpg+c.mpg#4.rep78), accum
test mpg=(mpg+c.mpg#5.rep78), accum

T

On Sat, Aug 27, 2011 at 4:14 AM, Michael Crain <[email protected]> wrote:
>>> reg y x1 x2 x3 x1*x2 x1*x3
>
> Might the test between the three groups be:
>
> test x1 = (x1 + x1*x2) = (x1 + x1*x3)
>
>
> --- On Sat, 8/27/11, Tirthankar Chakravarty <[email protected]> wrote:
>
>> From: Tirthankar Chakravarty <[email protected]>
>> Subject: Re: st: Testing the difference between coefficients with interaction variables
>> To: [email protected]
>> Date: Saturday, August 27, 2011, 4:00 AM
>> But that is implicit in what you are
>> testing (combine equation 1 and
>> negative of equation 2 to get first of second set). Recall
>> that Wald
>> tests need the row rank of the constraint matrix to be full
>> - the
>> latter two constraints are redundant and would lead to a
>> degenerate
>> constraint matrix.
>>
>> T
>>
>> On Sat, Aug 27, 2011 at 12:43 AM, Michael Crain <[email protected]>
>> wrote:
>> >> /****************************/
>> >> sysuse auto, clear
>> >> regress price c.mpg##i.rep78
>> >> testparm c.mpg#i.rep78, equal
>> >> /****************************/
>> >
>> >
>> > The output from this code seems to be testing the
>> joint significance of:
>> > group 2 - group 3 = 0
>> > group 2 - group 4 = 0
>> > group 2 - group 5 = 0
>> >
>> >
>> > I don't see these results testing:
>> > group 3 - group 4 = 0
>> > group 4 - group 5 = 0
>> >
>> > Am I misinterpreting?
>> >
>> >
>> > --- On Sat, 8/27/11, Tirthankar Chakravarty <[email protected]>
>> wrote:
>> >
>> >> From: Tirthankar Chakravarty <[email protected]>
>> >> Subject: Re: st: Testing the difference between
>> coefficients with interaction variables
>> >> To: [email protected]
>> >> Date: Saturday, August 27, 2011, 3:10 AM
>> >> 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
>> <[email protected]>
>> >> 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
>> <[email protected]>
>> >> wrote:
>> >> >
>> >> >> From: Tirthankar Chakravarty <[email protected]>
>> >> >> Subject: Re: st: Testing the difference
>> between
>> >> coefficients with interaction variables
>> >> >> To: [email protected]
>> >> >> 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
>> >> <[email protected]>
>> >> >> 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
>> >> >> [email protected]
>> >> >> [email protected]
>> >> >>
>> >> >> *
>> >> >> *   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
>> >> [email protected]
>> >> [email protected]
>> >>
>> >> *
>> >> *   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
>> [email protected]
>> [email protected]
>>
>> *
>> *   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
[email protected]
[email protected]

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index