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]

st: probing interactions with continuous variables with mi test / mi test transform


From   Justina Kamiel Grayman <[email protected]>
To   [email protected]
Subject   st: probing interactions with continuous variables with mi test / mi test transform
Date   Thu, 9 Jun 2011 12:34:44 -0400

i am doing some postestimation tests on multiply imputed data. i am
having trouble writing the syntax to test whether coefficients at 1
standard deviation below the mean(called "sdb" below), 1 standard
deviation above the mean (called "sda" below), and at the mean of a
continuous variable (called "avg" below) are different in a regression
involving the interaction between a continuous variable (knowlmleC)
and a dichotomous variable (bsent3ae). i would like to test 1) whether
each of these three coefficients (at 1 sd above, 1 sd below, and at
the mean) are equal to zero and 2) whether they are statistically
different from each other. here is my syntax.

*syntax to test whether the three coefficients are equal to zero
mi estimate (sdb: _b[bsent3ae] + _b[knowlmleCXbsent3ae]*79.35) ///
(avg:_b[bsent3ae] + _b[knowlmleCXbsent3ae]*100.55) ///
(sda:_b[bsent3ae] + _b[knowlmleCXbsent3ae]*121.75), saving(modund): ///
regress understanding ///
ageyearC female foreignborn bsgyfedC bsgedumC latino bsent3aa bsent3ab
bsent3ac bsent3ad bsent3ae ///
trustmleC knowlmleC knowlmleCXbsent3ae ///
mi test sdb avg sda ///

ERROR MESSAGE FOR THIS SYNTAX: variable mi not found
an error occurred when mi estimate executed regress on m=1
no results will be saved
r(111);


*syntax to test whether the three coefficients are equal
mi estimate (diff1: 1sda - avg) (diff2: 1sdb - avg), saving(modund): ///
regress understanding ///
ageyearC female foreignborn bsgyfedC bsgedumC latino bsent3aa bsent3ab
bsent3ac bsent3ad bsent3ae ///
regionne regionse regionwest urbanicityurban urbanicityrural ///
privateschool schoolseskindahigh schoolseskindalow schoolseslow ///
trustmleC knowlmleC knowlmleCXbsent3ae ///
mi testtransform diff1 diff2

ERROR MESSAGE FOR THIS SYNTAX: variable mi not found
an error occurred when mi estimate executed regress on m=1
no results will be saved
r(111);

*syntax to test whether the three coefficients are equal (more
complicated & i believe you can't do this because of all of the
brackets/parenthesis)
mi estimate: [diff1: (_b[bsent3ae] + _b[knowlmleCXbsent3ae]*79.35) -///
(_b[bsent3ae] + _b[knowlmleCXbsent3ae]*100.55)] ///
[diff2: (_b[bsent3ae] + _b[knowlmleCXbsent3ae]*121.75) -///
(_b[bsent3ae] + _b[knowlmleCXbsent3ae]*100.55)], saving(modund) ///
regress understanding ///
ageyearC female foreignborn bsgyfedC bsgedumC latino bsent3aa bsent3ab
bsent3ac bsent3ad bsent3ae ///
regionne regionse regionwest urbanicityurban urbanicityrural ///
privateschool schoolseskindahigh schoolseskindalow schoolseslow ///
trustmleC knowlmleC knowlmleCXbsent3ae ///
mi testtr diff1 diff2///

ERROR MESSAGE FOR THIS SYNTAX: [diff1 command not found
r(111);
*
*   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