View source: R/Ansari_Bradley_test.R
| Ansari_Bradley_test | R Documentation |
Performs Ansari-Bradley test to assess the null hypothesis that the variances are equal across all groups (samples) defined by the independent variable.
Ansari_Bradley_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 |
This function is based on Conover et al. (1981) and uses an approximate chi-square test. Results may be inaccurate for small total sample sizes (N < 20) or when there are many tied values.
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.
Ansari, A. R., & Bradley, R. A. (1960). Rank-sum tests for dispersions. The Annals of Mathematical Statistics, 31, 1174–1189.
Conover, W. J., Johnson, M. E., & Johnson, M. M. (1981). A comparative study of tests for homogeneity of variances, with applications to the outer continental shelf bidding data. Technometrics, 23, 351–361. https://doi.org/10.1080/00401706.1981.10487680
stats::ansari.test
df0 <- CYCB1[[1]]
out <- Ansari_Bradley_test(df0, cells ~ grp)
boxplot(cells ~ grp, df0, horizontal = TRUE)
points(x = df0$cells, 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.