Next: yulewalker() Up: MacAnova Help File Previous: xvariables()   Contents

# yates()

Usage:
 ```yates(x), x a REAL vector ```

Keywords: glm, anova
```yates(x) performs Yates' algorithm for the effects in a 2-series
factorial experiment.  The argument x should be a REAL vector
(univariate case) or matrix (multivariate case) containing the 2^k
observations in standard order, that is, the levels of the first factor
changing most rapidly.

When x is a vector, the value is a vector of the (2^k)-1 effects in
standard order and divisor 2^(k-1).  For example, for a 2^3 experiment
with data vector(x111,x211,x121,x221,x112,x212,x122,x222), the result is
vector(A, B, AB, C, AC, BC, ABC), where
A  = (-x111 + x211 - x121 + x221 - x112 + x212 - x122 + x222)/4
B  = (-x111 - x211 + x121 + x221 - x112 - x212 + x122 + x222)/4
AB = (+x111 - x211 - x121 + x221 + x112 - x212 - x122 + x222)/4
and so on.  The mean, (x111+x211+x121+x221+x112+x212+x122+x222)/8, is
not included.

In matrix notation, the k = 3 case can be expressed as
[ A   ]         [ -1   1  -1   1  -1   1  -1   1 ]  [ x111 ]
[ B   ]         [ -1  -1   1   1  -1  -1   1   1 ]  [ x211 ]
[ AB  ]         [  1  -1  -1   1   1  -1  -1   1 ]  [ x121 ]
[ C   ] = (1/4) [ -1  -1  -1  -1   1   1   1   1 ]  [ x221 ]
[ AC  ]         [  1  -1   1  -1  -1   1  -1   1 ]  [ x112 ]
[ BC  ]         [  1   1  -1  -1  -1  -1   1   1 ]  [ x212 ]
[ ABC ]         [ -1   1   1  -1   1  -1  -1   1 ]  [ x122 ]
[ x222 ]

When x is a matrix with m columns, the value is a (2^k) - 1 by m matrix,
each column of which is the result of applying Yates's algorithm to the
corresponding column of x.
```

Gary Oehlert 2003-01-15