Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

# st: ST: postestimation test

 From "Bontempo, Daniel E" To Subject st: ST: postestimation test Date Fri, 6 Aug 2010 09:38:40 -0500

```I think I am not understanding something about the "test" command used
after xtmixed.

The model showed the interaction of two factors was significant, and I
thought I could use "test" to probe which pairs of means were actually
different. But some comparisons involving the reference condition do not
work, and I am not sure why the test is giving chisq. How can I do
pairwise comparisons here. For example below the means of 55 and 56.25
for levels of ageGroup within condition level 1 are unlikely to be
different. But I wanted to test if the means across ageGroup differed at
both condition level 0 and 2, or just one of these levels. But, I could
not test 29.375 vs 37.14286. I know it has to do with 0 being the
baseline condition, but I do not have full understanding.

Any insights appreciated.

-----

. margins condition#ageGrp

Adjusted predictions                              Number of obs   =
225

Expression   : Linear prediction, fixed portion, predict()

------------------------------------------------------------------------
------
|            Delta-method
|     Margin   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+----------------------------------------------------------
------
condition#|
ageGrp |
0 0  |     29.375   3.797744     7.73   0.000     21.93156
36.81844
0 1  |   37.14286   4.059959     9.15   0.000     29.18548
45.10023
1 0  |      56.25   3.797744    14.81   0.000     48.80656
63.69344
1 1  |         55   4.059959    13.55   0.000     47.04263
62.95737
2 0  |      58.75   3.797744    15.47   0.000     51.30656
66.19344
2 1  |   49.28571   4.059959    12.14   0.000     41.32834
57.24309
------------------------------------------------------------------------
------

. test 0.condition#1.ageGrp=1.condition#1.ageGrp

( 1)  [condCorr_pct]0b.condition#1o.ageGrp -
[condCorr_pct]1.condition#1.ageGrp = 0

chi2(  1) =    1.38
Prob > chi2 =    0.2402

. test 1.condition#1.ageGrp==2.condition#1.ageGrp

( 1)  [condCorr_pct]1.condition#1.ageGrp -
[condCorr_pct]2.condition#1.ageGrp = 0

chi2(  1) =    1.14
Prob > chi2 =    0.2847

. test 0.condition#0.ageGrp=0.condition#1.ageGrp

( 1)  [condCorr_pct]0b.condition#0b.ageGrp -
[condCorr_pct]0b.condition#1o.ageGrp = 0
Constraint 1 dropped

chi2(  0) =       .
Prob > chi2 =         .

*
*   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/
```