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 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]

Re: st: Testing interaction terms


From   Verena Dill <dill@uni-trier.de>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Testing interaction terms
Date   Wed, 19 Jun 2013 15:27:29 +0200

What you wrote is exactly what I did in my regression (output below, just for the matter of illustration I included the four categories; var11: var1==1 & var2==1, var10: var1==1 & var2==0, var01: var1==0 & var2==1, var00: var1==0 & var2==0; because of the below mentioned structure of the data two of the categories are omitted).
------------------------------------------------------------------------------
partner | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
var11 | .7478253 .3528458 2.12 0.034 .0562602 1.43939 var10 | .9636673 .3315029 2.91 0.004 .3139335 1.613401
       var01 |          0  (omitted)
       var00 |          0  (omitted)
_cons | -.63364 .3095231 -2.05 0.041 -1.240294 -.0269858

But my question is: how can I test if the coefficients _b[var11] and _b[var10] are equal taking the "interaction"-nature of the variables into account? Using only "test _b[var11]= _b[var10 ]" does not account for that. Is there any other procedure I could use here (maybe similar to contrast)?



Am 19.06.2013 14:25, schrieb David Hoaglin:
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/
*
*   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/


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