View source: R/permTestAnova.R
permTestAnova | R Documentation |
Permutation test to see if the population mean is the same for two or more
populations. For instance, test latex
where
latex
denotes the population mean. The values of the numeric
variable are randomly assigned to the groups and the ANOVA F statistic is
calculated. The command will print the mean and
standard error of the distribution of the test statistic as well as a
P-value.
permTestAnova(x, ...)
## Default S3 method:
permTestAnova(
x,
group,
B = 9999,
plot.hist = TRUE,
plot.qq = FALSE,
xlab = NULL,
ylab = NULL,
title = NULL,
seed = NULL,
...
)
## S3 method for class 'formula'
permTestAnova(formula, data = parent.frame(), subset, ...)
x |
a numeric vector. |
... |
further arguments to be passed to or from methods. |
group |
a factor variable with two or more levels. If |
B |
the number of resamples (positive integer greater than 2). |
plot.hist |
a logical value. If |
plot.qq |
a logical value. If |
xlab |
an optional character string for the x-axis label |
ylab |
an optional character string for the y-axis label |
title |
an optional character string giving the plot title |
seed |
optional argument to |
formula |
a formula of the form |
data |
a data frame with the variables in the formula. |
subset |
an optional expression specifying which observations to keep. |
Observations with missing values are removed.
Returns invisibly a vector of the replicates of the test statistic.
permTestAnova(default)
: Permutation test for ANOVA F-test
permTestAnova(formula)
: Permutation test for ANOVA F-test
Adam Loy, Laura Chihara
Tim Hesteberg's website: https://www.timhesterberg.net/bootstrap-and-resampling
permTestAnova(states03$ViolentCrime, states03$Region, B = 499)
#using formula syntax
## Not run:
permTestAnova(ViolentCrime ~ Region, data = states03, B = 9999)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.