twoway.formula(formula=formula(data), data=sys.parent(), subset,
na.action, trim=.5, iter=6, eps=<<see below>>, print=F)
z ~ x * y
The
z variable is a numeric response.
Missing values (
NAs) are allowed.
The
x represents the row variable.
The
y represents the column variable.
formula.
model.frame after
any
subset argument has been used.
The default (with
na.fail) is to create an error
if any missing values are found.
A possible alternative is
na.omit, which deletes observations
that contain one or more missing values.
trim=0 will cause
analysis by means, .25 by midmeans, etc.
eps is given, the algorithm will
iterate until the maximum change in row or column effects is
less than
eps. The default is to iterate until the specified number
of iterations or until converged to the accuracy of the
machine arithmetic. It is not always possible to converge
to a unique answer.
TRUE, the maximum change in row/column effects in
the last iteration is printed.
resid,
row,
col,
and
grand, such that
x[i,j]
equals
grand + row[i] + col[j] + resid[i,j]
This is the formula version of
twoway.
The response
z is converted to a table (matrix) cross classified
by the values of
x and
y.
This matrix is then passed to
twoway.default.
For further details see the
twoway documentation.
twoway(coal ~ x * y, data=coal.ash)