Description Usage Arguments Value Note Author(s) References
A function used to calculate a 2 x 2 table of means for use in ANOVA.
1 2 | crossMeans(dtf, f1 = "f1", f2 = "f2", y = "y", deci = 1,
margins = FALSE)
|
dtf |
A data frame. |
f1 |
Name of the first categorical predictor variable (quoted or unquoted). Defaults to |
f2 |
Name of the second categorical predictor variable (quoted or unquoted). Defaults to |
y |
Name of the quantitative outcome (quoted or unquoted). Defaults to |
deci |
Number of decimal places in the output. Defaults to |
margins |
Set to TRUE to add marginal means. Defaults to |
A named matrix with the resulting 2-way table of means.
Minor style modifications made by Frank Kovacs (fkovacs AT andrew.cmu.edu).
We use the drop = FALSE
in the aggregate
function in the
code to account for missing values.
Howard Seltman, hseltman AT stat.cmu.edu
Code taken from Howard Seltman's (hseltman AT cmu.edu) personal website. http://www.stat.cmu.edu/~hseltman/AboutMe.html.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.