View source: R/BMTest_permutations.R
BMpTest | R Documentation |
Performs the Brunner-Munzel test using a permutation approach, suitable for comparing two independent samples when the assumption of equal variances may not hold.
BMpTest(
grupo1,
grupo2,
alpha = 0.05,
alternative = c("two.sided", "less", "greater"),
nperm = 10000,
seed = NULL
)
grupo1 |
A numeric vector representing the first group. |
grupo2 |
A numeric vector representing the second group. |
alpha |
Significance level (default is 0.05). |
alternative |
Character string specifying the alternative hypothesis:
one of |
nperm |
Number of permutations to perform (default = 10000). |
seed |
Optional random seed for reproducibility (default is NULL). |
This version computes an empirical p-value based on resampling, without relying on the t-distribution approximation.
An object of class "comparacion"
and "brunnermunzel_perm"
, containing:
Resultados
: A data frame with comparison name, mean difference, empirical p-value, and significance.
Promedios
: A named numeric vector of group means.
Orden_Medias
: Group names ordered by their mean.
Metodo
: Description of the method used.
Brunner, E., & Munzel, U. (2000). "The nonparametric Behrens-Fisher problem: Asymptotic theory and a small-sample approximation." Biometrical Journal, 42(1), 17–25.
data(d_e, package = "Analitica")
g1 <- d_e$Sueldo_actual[d_e$labor == 1]
g2 <- d_e$Sueldo_actual[d_e$labor == 2]
resultado <- BMpTest(g1, g2)
summary(resultado)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.