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

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

From |
Richard Goldstein <richgold@ix.netcom.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Testing interaction terms |

Date |
Wed, 19 Jun 2013 09:31:17 -0400 |

to continue David's example a little - if you do what he says (using the "hascons" option on your linear regression), you can then use a post-hoc test to test whether you really have an interaction or whether the effects of var1 and var2 are additive Rich On 6/19/13 8:25 AM, David Hoaglin wrote: > Verena, > > Because the data have no observations for var1==0 & var2==0, it is not > possible to express the combined effect of those variables (in the > linear predictor) in the usual way, > (effect of var1) + (effect of var2) + (interaction). > One alternative approach is to treat the combination of var1 and var2 > as a categorical variable with three categories: var1==0 & var2==1, > var1==1 & var2==0, and var1==1 & var2==1. > > David Hoaglin > > On Wed, Jun 19, 2013 at 8:06 AM, Verena Dill <dill@uni-trier.de> wrote: >> I obtained the coefficients from a regression model and want to test whether >> or not the coefficients are significantly different from each other. >> The problem now is that the two variables are related to each other like >> interactions and only partly overlap. >> >> var1: variable 1 (dummy) >> var2: variable 2 (dummy) >> interaction: interaction of variable 1 and variable 2 >> >> tab var1 var2 >> >> var1 | var2 >> | 0 1 | Total >> -----------+----------------------+---------- >> 0 | 0 122 | 122 >> 1 | 322 256 | 578 >> -----------+----------------------+---------- >> Total | 322 378 | 700 >> >> Since no observations exist for var1==0 & var2==0 I can only include the >> interaction and one of the variables (just to mention that: From a >> theoretical sense it makes sense to do so): "probit var1 interaction" >> Now I want to test if I can reject the hypothesis that >> _b[var1]=_b[interaction]. If I use the standard command "test" it does not >> account for the fact that these variables are related. >> >> Because of the nature of my variables I wanted to use the "contrast" command >> but this only works if I'd use something like this before: "probit >> var1##var2" which is not solvable because of the above mentioned fact that >> var1==0 & var2==0 does not exist in the data. >> >> Can anybody suggest another command that takes into account that the two >> variables are interacted or has ideas on how to adjust the >> "contrast"-command? >> >> Any help is greatly appreciated! >> >> Verena * * 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/

**References**:**st: Testing interaction terms***From:*Verena Dill <dill@uni-trier.de>

**Re: st: Testing interaction terms***From:*David Hoaglin <dchoaglin@gmail.com>

- Prev by Date:
**Re: st: Testing interaction terms** - Next by Date:
**Re: st: Testing interaction terms** - Previous by thread:
**Re: st: Testing interaction terms / mutually exclusive variables** - Next by thread:
**st: Selecting specific observations based on two variables** - Index(es):