View source: R/Bartlett_test.R
| Bartlett_test | R Documentation |
Performs Bartlett's test to assess the null hypothesis that variances are equal across all groups (samples) defined by the independent variable. This test assumes that the data within each group are normally distributed and is sensitive to departures from normality.
Bartlett_test(
data,
formula,
alpha = 0.05,
silent = FALSE,
summary = FALSE,
misc = FALSE
)
data |
A data frame containing the variables specified in the formula. |
formula |
A formula of the form |
alpha |
A numeric value specifying the significance level. Must be between 0 and 1. Default is 0.05. |
silent |
A logical value. If |
summary |
A logical value (default: |
misc |
A logical value. If |
A list containing the test statistics, p-value, degrees of freedom,
and optionally a summary table and/or auxiliary parameters,
depending on the values of summary and misc.
Bartlett, M. S. (1937). Properties of sufficiency and statistical tests. Proceedings of the Royal Society of London. Series A, Mathematical and Physical Sciences, 160(901), 268–282. https://doi.org/10.1098/rspa.1937.0109
Montgomery, D. C. (2017). Experiments with a single factor: The analysis of variance. In Design and analysis of experiments (9th ed., pp. 82–83). John Wiley & Sons. ISBN: 9781119299363
stats::bartlett.test
df0 <- roGFP[[1]]
out <- Bartlett_test(df0, ro ~ grp)
boxplot(ro ~ grp, df0, horizontal = TRUE)
points(x = df0$ro, y = jitter(as.numeric(df0$grp), amount = 0.15))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.