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

# st: Anova and pwcompare and not estimable

 From Garry Anderson To "statalist@hsphsun2.harvard.edu" Subject st: Anova and pwcompare and not estimable Date Mon, 9 Jan 2012 08:52:34 +0000

```Dear Statalist,

The following output from the -pwcompare- command after -anova- compares all pairwise differences in a repeated measures anova with one factor being repeated. The standard errors are not estimable when comparing levels of the between subject factor (calib). There do not appear to be any empty cells. Empty cells can cause the 'not estimable' text.
Calib is a between subject factor and shape is a within subject factor.

Note I have separate subjects for the two levels of calib.

An suggestions as to how to estimate these standard errors would be appreciated.

An example follows

. set more off

. use http://www.stata-press.com/data/r12/t77
(T7.7 -- Winer, Brown, Michels)

. gen sub1to6 = subject

. replace sub1to6=sub1to6 + 3 if calib==2

. anova score calib / sub1to6|calib shape calib#shape,repeated(shape)

Number of obs =      24     R-squared     =  0.8925
Root MSE      = 1.11181     Adj R-squared =  0.7939

Source |  Partial SS    df       MS           F     Prob > F
--------------+----------------------------------------------------
Model |     123.125    11  11.1931818       9.06     0.0003
|
calib |  51.0416667     1  51.0416667      11.89     0.0261
sub1to6|calib |  17.1666667     4  4.29166667
--------------+----------------------------------------------------
shape |  47.4583333     3  15.8194444      12.80     0.0005
calib#shape |  7.45833333     3  2.48611111       2.01     0.1662
|
Residual |  14.8333333    12  1.23611111
--------------+----------------------------------------------------
Total |  137.958333    23  5.99818841

Between-subjects error term:  sub1to6|calib
Levels:  6         (4 df)
Lowest b.s.e. variable:  sub1to6
Covariance pooled over:  calib     (for repeated variable)

Repeated variable: shape
Huynh-Feldt epsilon        =  0.8483
Greenhouse-Geisser epsilon =  0.4751
Box's conservative epsilon =  0.3333

------------ Prob > F ------------
Source |     df      F    Regular    H-F      G-G      Box
--------------+----------------------------------------------------
shape |      3    12.80   0.0005   0.0011   0.0099   0.0232
calib#shape |      3     2.01   0.1662   0.1791   0.2152   0.2291
Residual |     12
-------------------------------------------------------------------

. pwcompare calib#shape

Pairwise comparisons of marginal linear predictions

Margins      : asbalanced

-----------------------------------------------------------------
|   Contrast   Std. Err.     [95% Conf. Interval]
----------------+------------------------------------------------
calib#shape |
(1 2) vs (1 1)  |         -1   .9077853     -2.977894    .9778942
(1 3) vs (1 1)  |          3   .9077853      1.022106    4.977894
(1 4) vs (1 1)  |   .6666667   .9077853     -1.311227    2.644561
(2 1) vs (1 1)  |          .  (not estimable)
(2 2) vs (1 1)  |          .  (not estimable)
(2 3) vs (1 1)  |          .  (not estimable)
(2 4) vs (1 1)  |          .  (not estimable)
(1 3) vs (1 2)  |          4   .9077853      2.022106    5.977894
(1 4) vs (1 2)  |   1.666667   .9077853     -.3112275    3.644561
(2 1) vs (1 2)  |          .  (not estimable)
(2 2) vs (1 2)  |          .  (not estimable)
(2 3) vs (1 2)  |          .  (not estimable)
(2 4) vs (1 2)  |          .  (not estimable)
(1 4) vs (1 3)  |  -2.333333   .9077853     -4.311227   -.3554392
(2 1) vs (1 3)  |          .  (not estimable)
(2 2) vs (1 3)  |          .  (not estimable)
(2 3) vs (1 3)  |          .  (not estimable)
(2 4) vs (1 3)  |          .  (not estimable)
(2 1) vs (1 4)  |          .  (not estimable)
(2 2) vs (1 4)  |          .  (not estimable)
(2 3) vs (1 4)  |          .  (not estimable)
(2 4) vs (1 4)  |          .  (not estimable)
(2 2) vs (2 1)  |  -1.666667   .9077853     -3.644561    .3112275
(2 3) vs (2 1)  |   1.666667   .9077853     -.3112275    3.644561
(2 4) vs (2 1)  |   2.333333   .9077853      .3554392    4.311227
(2 3) vs (2 2)  |   3.333333   .9077853      1.355439    5.311227
(2 4) vs (2 2)  |          4   .9077853      2.022106    5.977894
(2 4) vs (2 3)  |   .6666667   .9077853     -1.311227    2.644561
-----------------------------------------------------------------

. table calib shape,con(n score)

----------------------------------
2 methods |
for       |
calibrati |     4 dial shapes
ng dials  |    1     2     3     4
----------+-----------------------
1 |    3     3     3     3
2 |    3     3     3     3
----------------------------------

.
Kind regards, Garry
Garry Anderson
Faculty of Veterinary Science
University of Melbourne
250 Princes Highway    Ph  03 9731 2221
WERRIBEE    3030       Fax 03 9731 2388
Email:  g.anderson@unimelb.edu.au

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