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: Understanding interaction tests using testparm
From
Amal Khanolkar <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE: st: Understanding interaction tests using testparm
Date
Thu, 17 Oct 2013 15:15:02 +0000
Thanks Adam!
Makes sense - :)
Amal
________________________________________
From: [email protected] [[email protected]] on behalf of Adam Olszewski [[email protected]]
Sent: 17 October 2013 17:03
To: [email protected]
Subject: Re: st: Understanding interaction tests using testparm
Hi Amal,
You ran a regression model with an interaction between two variables.
You then requested a Wald test for the interaction term. Stata
displays to you what is specifically being tested, ie. that the two
coefficients of the equation terms (which were estimated as 0.248 and
0.41) are equal to zero. The test has a P value of 0.017, which
rejects the hypothesis that both coefficients are simultaneously equal
to zero. Therefore there is a statistically significant interaction
between your two variables.
If both coefficients would be zero, then the term falls out of the
equation, there would be no interaction and you could omit the term
from the model. Testparm lists those two equations just for your
convenience and clarity. Nothing particularly magical about it.
Adam
On Thu, Oct 17, 2013 at 10:50 AM, Amal Khanolkar <[email protected]> wrote:
> Hi,
>
> I ran the code below to check if ethnic origin modifies the association between foetal growth rate and blood pressure (interaction test). The overall P value is 0.01 suggesting that ethnicity does interact in this particular association.
>
> However, I'd like to know how one could interpret the two lines: ( 1) 2.ethnicity_bi2x#c.bwtgestage_sd = 0 & ( 2) 3.ethnicity_bi2x#c.bwtgestage_sd = 0 following the testparm command? What if these two lines were not equal to zero, then what would it indicate or men?
>
> . regress syst i.ethnicity_bi2x bwtgestage_sd i.ethnicity_bi2x#c.bwtgestage_sd age byear i.conscript_office bmi height_cons i.education if multibirth==1 & sex==1, cluster (
>> mor_lopnr)
>
> Linear regression Number of obs = 406833
> F( 15,341530) = 1943.04
> Prob > F = 0.0000
> R-squared = 0.0678
> Root MSE = 10.684
>
> (Std. Err. adjusted for 341531 clusters in mor_lopnr)
> ------------------------------------------------------------------------------------------------
> | Robust
> syst | Coef. Std. Err. t P>|t| [95% Conf. Interval]
> -------------------------------+----------------------------------------------------------------
> ethnicity_bi2x |
> 2 | -.2589265 .1110183 -2.33 0.020 -.4765191 -.0413339
> 3 | -3.66467 .2234417 -16.40 0.000 -4.102609 -3.226731
> |
> bwtgestage_sd | -.6331861 .0183312 -34.54 0.000 -.6691147 -.5972576
> |
> ethnicity_bi2x#c.bwtgestage_sd |
> 2 | .2487216 .1125171 2.21 0.027 .0281913 .4692519
> 3 | .4104538 .2256185 1.82 0.069 -.0317518 .8526595
> |
> age | .2760919 .037636 7.34 0.000 .2023263 .3498574
> byear | .1487112 .0040109 37.08 0.000 .1408499 .1565725
> |
> conscript_office |
> 2 | -3.088194 .04866 -63.46 0.000 -3.183566 -2.992822
> 3 | 2.079715 .052997 39.24 0.000 1.975842 2.183588
> 5 | -2.656468 .0467039 -56.88 0.000 -2.748006 -2.56493
> |
> bmi | .5760443 .0056095 102.69 0.000 .5650499 .5870388
> height_cons | .1654513 .0027716 59.70 0.000 .1600191 .1708835
> |
> education |
> 2 | .0172131 .0475919 0.36 0.718 -.0760656 .1104918
> 3 | .1056411 .0606545 1.74 0.082 -.01324 .2245223
> 4 | .0973 .0585897 1.66 0.097 -.0175342 .2121342
> |
> _cons | -211.6231 7.968493 -26.56 0.000 -227.2411 -196.0051
> ------------------------------------------------------------------------------------------------
>
> . testparm i.ethnicity_bi2x#c.bwtgestage_sd
>
> ( 1) 2.ethnicity_bi2x#c.bwtgestage_sd = 0
> ( 2) 3.ethnicity_bi2x#c.bwtgestage_sd = 0
>
> F( 2,341530) = 4.05
> Prob > F = 0.0174
>
>
> Thanks!
>
> /Amal
>
>
> *
> * 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/
*
* 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/