| Levene_test | R Documentation |
Performs Levene's test to assess the null hypothesis that the variances are equal across all groups (samples) defined by the independent variable.
Levene_test(
data,
formula,
alpha = 0.05,
silent = FALSE,
summary = FALSE,
misc = FALSE,
transform = function(x) abs(x - stats::median(x))
)
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 |
transform |
A function used to transform the response variable into deviations from a specified location measure. |
transform:
The concept is similar to ANOVA procedure (transform the response variable to
residuals before analysis). Possible transformation are:
y' = |yi - ybar| (default)
y' = (yi - ybar) ^ 2
y' = ln((yi - ybar) ^ 2)
y' = sqrt(|yi - ybar|)
The ybar could be either mean, median (default), or trimmed-mean.
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.
Levene, H. (1960). Robust tests for equality of variances. In I. Olkin (Ed.), Contributions to probability and statistics: Essays in honor of Harold Hotelling (pp. 278–292). Stanford University Press.
Sharma, D., & Kibria, B. M. G. (2013). On some test statistics for testing homogeneity of variances: A comparative study. Journal of Statistical Computation and Simulation, 83, 1944–1963. https://doi.org/10.1080/00949655.2012.675336
Zhou, Y., Zhu, Y., & Wong, W. K. (2023). Statistical tests for homogeneity of variance for clinical trials and recommendations. Contemporary Clinical Trials Communications, 33, 101119. https://doi.org/10.1016/j.conctc.2023.101119
Brown_Forsythe_test
df0 <- roGFP[[1]]
out <- Levene_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.