oneway: Perform One-way ANOVA tests

Description Usage Arguments Details Value See Also Examples

View source: R/oneway.R

Description

The oneway function performs a one way analysis of variance given a formula and a data set.

Usage

1

Arguments

formula

formula specifying dependent variable y and independent variables x, written as "y ~ x"

data

dataset which contains the variables specified in formula

Details

The oneway function is essentially a wrapper for the lm function, but returns instead a list containing the lm object and a dataframe of summary stats. Additionally, plot, print, and summary methods are provided under the class oneway

Value

a list containing fit, the model object, and summarystats, a dataframe of summary stats.

See Also

lm

Examples

1
2
3
4
5
## Not run: 
# test for differences in mpg by number of cylinders (cyl) in mtcars
my_anova <- oneway(formula = mpg ~ as.factor(cyl), data = mtcars)

## End(Not run)

marginal-latte/oneway documentation built on Dec. 21, 2021, 1:52 p.m.