4/9/03 5:26 PM
File = E:\r\fns\aov.contrast doc.doc
1
John Miyamoto
Department of Psychology, Box 351525, University of Washington, Seattle, WA 98195
Email: [email protected]
April 9, 2003
Documentation for the 'aov.contrast' Function
This documentation has four sections.
Section I presents documentation in the standard R-Help format.
It is probably more useful for people who are experienced users of R.
Section II has a more discursive
explanation of the aov.contrast function that is probably more useful to more inexperienced users of R.
Section III has examples that use 'aov.contrast' in the context of an analysis of covariance.
Section IV
shows the R code for the 'aov.contrast' function.
----------------------------------------------------------------------
Section I: R documentation for the 'aov.contrast' function
Description
Computes t-tests, confidence intervals, and other statistics for user-defined contrasts (linear combinations
of cell means) in a between-subjects analysis of variance (completely randomized design).
Usage
aov.contrast <- function(lm.input, margin=1, contrast.list, strata=NA,
Confidence.Level = .95, var.equal=TRUE, show.cellcode=TRUE, p.digits=6)
Arguments
lm.input
A 'lm' or 'aov' object, i.e., the output of a call to 'lm' or 'aov'.
margin
A vector of positive integers that indicate the factor or factors over whose levels the
contrast is defined.
The factors are listed in the same order as in the 'formula'
argument of the call to 'aov'.
For example, if the 'Y ~ A1*A2*A3' is the formula in
the call to 'aov', then 'margin=3' indicates that the contrast coefficients apply to the
levels of the 'A3' factor.
contrast.list
A list of numeric vectors.
Each vector indicates the contrast coefficients for the
marginal means specified by 'margin'.
All vectors must have the same length as the
number of marginal means determined by 'margin'.
strata
If 'strata' is non-missing, it must be a vector of integers indicating the factor or
factors that play the role of strata.
Each contrast is computed within every fixed level
of the stratifying factors.
Confidence.Level
Level of confidence for the confidence intervals.
var.equal
If var.equal = TRUE if and only if homogeneity of variance is assumed in the test of
the contrast.
The default is var.equal = TRUE.
show.cellcode
When margin specifies more than one factor, e.g., 'margin = c(2, 3)', the contrast
coefficients define a linear combination with respect to all combinations of factors 2
and 3.
If factor 2 has k levels and factor 3 has m levels, there are k*m combinations
of levels.
If 'show.cellcode = TRUE', then the output displays the correspondence
between the sequence of coefficients specified through 'contrast.list' and the k*m
levels of factors 2 and 3.

This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*