help anovacontrast
--------------------------------------------------------------------------------------------------------------------------------------------


Title

        anovacontrast -- Contrasts among means after anova

Syntax
        anovacontrast indvar [if], values(numlist) [ title(text) nu(dfe) ss(sse) ]


Description

anovacontrast performs a 1 degree of freedom test among the means of 
varname as specified by the weights found in values.  anovacontrast 
is run after first using anova to perform an analysis of variance.

anovacontrast is designed to work with any factorial design,
balanced or unbalanced. Of course, extreme care must be
taken in interpreting the results from factorial models 
when there are significant interactions.  

anovacontrast may not work with all possible anova designs.  
Users should take care in using it.

Note: anovacontrast gives incorrect and misleading results when 
there are missing or empty cells.


Options

values(numlist) specifies the weights for the contrast (not optional).

title(text) specifies the title to be used with the contrast.

nu(dfe) supplies the degrees of freedom for the estimate given in the ^ss^ 
    option, and must accompany the ss option.  By default, the e(df_r) 
    of the ANOVA is used.

ss(sse) supplies an estimate of the sum of squares error, assumed to be 
    constant over levels of X, which is used to calculate standard errors 
    of differences in Y means.  By default, the e(rss) of the ANOVA is used.


Note

The probability values displayed in the output are per contrast.
Care should be exercised in using multiple anovacontrast commands,
especially when using anovacontrast to perform post-hoc comparisons.
The Scheffˇ procedure is recommended for post-hoc non-pairwise contrasts.

Examples

 . anova y a b a*b
 . anovacontrast b, values(1 1 -1 -1)
 . anovacontrast b if a==1, values(1 -1 0 0)
 . anovacontrast b, values(-3 -1 1 3) title(linear trend)
 . anovacontrast b, values(1 -1 -1 1) title(quadratic trend)
 . anovacontrast b, values(1 -1 0 0) nu(3) ss(19.375)


Author

      Philip B. Ender
      Statistical Computing and Consulting
      UCLA Academic Technology Services
      ender@ucla.edu 

Reference

Kirk, R. E. 1995. Experimental Design. 2d ed. Pacific Grove, CA: Brooks/Cole


Also see

    Manual:  [R] anova

    Online:  Help for anova