Fits a One-way Model to Univariate Data Grouped by a Factor

USAGE:

oneway(formula, data, location = mean, 
       spread = function(x) sqrt(var(x))) 

ARGUMENTS:

formula
a formula defining the response and the factor predictor. This is an expression of the form: y ~ x where y is the response and x is a factor predictor. The formula may be given literally, or it may be an expression that evaluates to a formula.
data
data frame in which the formula will be evaluated. If missing, evaluation will take place as if the formula were evaluated in the frame of the function calling oneway.
location
numeric value giving the location statistic for each group in x or a function which, when applied to a group, constructs a location estimate. Common values for location are median (to center about medians) or 0 (to avoid centering).
spread
numeric value giving the spread statistic for each group in x or a function which, when applied to a group, constructs a spread estimate. Common values for spread are function(x) diff(quantile(x,c(.75,.25)))/1.35 (to scale by inter-quartile range) or 1 (to avoid scaling). The spread values are used to produce scaled.residuals.

VALUE:

a list with components
location
vector of locations for each group.
spread
vector of spreads for each group.
fitted.values
the locations for each data point.
residuals
y minus the location for the group.
scaled.residuals
y minus the location for the group, scaled by the scale for the group.

SEE ALSO:

.

EXAMPLES:

oneway(singer$height, singer$voice.part)$residuals