BMTest {Analitica}R Documentation

Brunner-Munzel Test for Two Independent Samples

Description

Performs the Brunner-Munzel nonparametric test for two independent groups, which estimates the probability that a randomly selected value from one group is less than a randomly selected value from the other group.

Usage

BMTest(
  grupo1,
  grupo2,
  alpha = 0.05,
  alternative = c("two.sided", "less", "greater")
)

Arguments

grupo1

Numeric vector of values from group 1.

grupo2

Numeric vector of values from group 2.

alpha

Significance level (default = 0.05).

alternative

Character string specifying the alternative hypothesis. One of "two.sided" (default), "greater", or "less".

Details

This test is suitable when group variances are unequal and/or sample sizes differ. It does not assume equal variances and is often used as a more robust alternative to the Wilcoxon test.

Advantages: - Handles unequal variances and non-normality. - Recommended when variance homogeneity is questionable.

Disadvantages: - Less well-known and supported. - Requires large sample sizes for accurate inference.

Value

An object of class "comparacion" and "brunnermunzel", containing:

References

Brunner, E., & Munzel, U. (2000). "The nonparametric Behrens-Fisher problem: Asymptotic theory and a small-sample approximation." Biometrical Journal, 42(1), 17–25. <https://doi.org/10.1002/(SICI)1521-4036(200001)42:1

Examples

data(d_e, package = "Analitica")
g1 <- d_e$Sueldo_actual[d_e$labor == 1]
g2 <- d_e$Sueldo_actual[d_e$labor == 2]
resultado <- BMTest(g1, g2, alternative = "greater")
summary(resultado)


[Package Analitica version 1.8.5 Index]