POWER ANALYSIS FOR CONTRASTS AND COMPARISONS

The user interface uses sliders that are convertible to
text input; see the Help menu item "GUI Help" for more
information.  Basic layout is as follows:

Left panel
    This is used to vary the numbers of factor levels, of
    the fixed factors, and the sample size of the random
    factors.

Middle panel
    Here, we specify the SD of each random (or mixed) term
    in the model.  If you are using pilot data, estimate
    the variance components and put their square roots
    here.

Right panel
    This is where the factor levels of interest, the
    contrast, the critical value, and the effect size are
    entered, and the power is observed.  See details below.

Options menu
  Graph 
    Provides for simple graphics output based on the values
    in the dialog.  It "plays" the dialog for the values 
    you specify, and plots the results.
    
  Auto Bonferroni
    If this box is checked, the software tries to guess
    how many comparisons to use in the Bonferroni correction.
    It may not guess right, so watch carefully!
    
  ANOVA dialog
    Creates a companion dialog for ANOVA F tests, and links
    parameter values so that they stay in correspondence.
    
  Show EMS
    Displays the expected mean squares (unrestricted model)
    for the ANOVA associated with this model.
    
  Report
    Generates a report for the current settings of factor 
    levels, method, etc.
    
  Quit
    Close the dialog and all of its dependents.


SOME DETAILS

Contrast definition
    Select the term whose levels you want to contrast.
    Separate the coefficients with commas or spaces.  The
    contrast coefficients box need not contain as many
    coefficients as levels; any absent coefficients are
    taken to be zero.  If there are more coefficients than 
    the number of levels, the extras are ignored.  In any 
    case, those used must sum to zero.  A simple comparison 
    of two factor levels is specified as "-1,1".

Restriction
    This is used to define a restriction on the family of
    contrasts in non-main-effects cases.  It affects how
    the critical value is computed and hence the power.
    There is further discussion below under "Notes and
    cautions."  Also, in certain mixed models, the
    variance of an interaction contrast can depend on
    whether it is restricted to the same level of some
    factor (details of variance formulas are included in
    the report available from the Options menu).  For a
    contrast, a restriction is satisfied if the contrast
    coefficients sum to zero at each level of the
    factor(s) named in the restriction.

Method, alpha, # means, # tests, One-sided
    The power is computed based on the probability of
    finding a contrast significant based on the critical
    value chosen here.  This in turn is based on a
    family of tests contrasting several means; the number
    of means in the family is shown; how it is used
    depends on the method:
    
        t: # means is ignored -- no correction is made
           for multiple tests.
        Dunnett: A correction is made for # means -1
           comparisons (each treatment with a control).
           [Currently, this is only approximate & is
           based on a Bonferroni correction for that
           many comparisons.]  Don't use this for
           arbitrary contrasts -- only comparisons.
        Tukey/HSD: This is appropriate for pairwise com-
           parisons among (# means) means.  Don't use this 
           for arbitrary contrasts -- only comparisons.
        Bonferroni: This makes a conservative correction
           to a family of tests by dividing alpha by the
           number of tests.  Another window opens to speci-
           fy the number of tests in the family.  By de-
           fault, this is set automatically to (# means 
           choose 2).  The Options menu provides for dis-
           abling this feature ("Auto Bonferroni").  When
           in manual mode, # tests is changed only when
           the comparison is changed or when the number
           of levels of a fixed factor is changed.
         Scheffe: The Scheffe method controls the overall
            significance level of all possible contrasts
            among the (# means) means.
    
    If the "One-sided checkbox is checked, power is calculated
    based ona one-sided test.  Otherwise, a two-sided test is
    assumed.
    
Detectable contrast and power
    Enter the value of the contrast of means that is of
    scientific interest.  The power is then the
    probability of being able to detect a contrast of that
    magnitude.


NOTES AND CAUTIONS
    At present, the Dunnett critical values are only
    approximated -- using a Bonferroni correction for k-1
    tests, where k is the number of levels of the factor
    or factor combination.  
    
    Unless you're looking at comparisons (as opposed to
    contrasts), the Tukey and Dunnett methods don't make
    much sense.
    
    Corrections for multiple testing (all except the "t"
    option for the critical value) are made relative to
    a family of tests for which the overall significance
    level (probability of at least one type one error
    within that family of tests) is controlled at alpha. 
    The size of the family is displayed as "# means".
    It is important to understand what family is being
    considered.  When a main effect is specified, the
    family includes all levels of that factor.  In that
    case, as is well know, the Tukey method covers all 
    pairwise comparisons and the Scheffe method covers 
    all possible contrasts.
    
    When a two-way interaction is specified, there are
    more choices, and you may or may not agree with the
    choices I have made.  First, an "unrestricted" set of
    contrasts corresponds to the family of all factor
    combinations; so for levels of A*B where A has 3
    levels and B has 4 levels, we treat this as contrasts
    among 12 means; so the Tukey method is based on the
    studentized range of 12 means, and the Scheffe method
    is based on the F distribution with 11 numerator
    degrees of freedom.
    
    If restrictions are placed on the comparison, then the
    family is restricted accordingly.  For example, with
    A*B as in the preceding paragraph, specifying "Same A"
    sets up the computations for a family of 4 means.  The
    Tukey method is based on the studentized range of 4 
    means, and the Scheffe method is based on the F dis-
    tribution with 3 numerator d.f.  In other words, the
    overall significance level, alpha, is restricted in
    the same way -- to each level of A.  Viewing all
    tests made on the three sets of 4 means as one family,
    the overall significance level is higher than what
    is specified.  Because of this design decision, the
    powers of restricted contrasts will generally be
    *much* higher than the powers of unrestricted 
    contrasts.
    
    One more note on restrictions.  For A having 3 levels
    and B having 4 levels, consider for example the
    contrast with coefficients:
    
                B1  B2  B3  B4
            A1  -1   1   0   0
            A2  -1  -1   2   0
            A3   2  -3   0   1

    The restriction "Same A" is satisfied, since for any
    A, the coefficients sum to zero.  The restriction
    "Same B" is not satisfied, since they do not sum to 
    zero at each level of B (look beyond B1...).
    
    By the way, the dialog does not pay attention to
    which coefficients are assigned to which means -- only
    the sum of the squares is really needed.  So you may
    specify the above contrast as "-1,1,0,0,-1,-1,2,0,2,
    -3,0,1", or "-1,1,-1,1,2,2,-3,1" (skip the 0s), or
    the same numbers in any other order.
