NemenyiTest | R Documentation |
Performs the Nemenyi test after a significant Kruskal-Wallis or Friedman test. Based on the studentized range distribution applied to mean ranks.
NemenyiTest(formula, data, alpha = 0.05)
formula |
A formula of the form |
data |
A data frame containing the variables. |
alpha |
Significance level (default is 0.05). |
Advantages: - Easy to implement for equal-sized groups. - Conservative control of family-wise error rate.
Disadvantages: - Only valid with equal group sizes. - No p-values are directly calculated (based on critical differences only).
An object of class "nemenyi"
and "comparaciones"
, including:
Resultados
: Data frame with group comparisons, rank differences, critical value, p-values, and significance codes.
Promedios
: Mean ranks of each group.
Orden_Medias
: Group names ordered from highest to lowest rank.
Metodo
: Name of the method ("Nemenyi (no paramétrico)").
Nemenyi, P. (1963). Distribution-free Multiple Comparisons.
set.seed(123)
datos <- data.frame(
grupo = rep(c("A", "B", "C", "D"), each = 10),
medida = c(
rnorm(10, mean = 10),
rnorm(10, mean = 12),
rnorm(10, mean = 15),
rnorm(10, mean = 11)
)
)
table(datos$grupo)
#> A B C D
#>10 10 10 10
# Aplicar el test de Nemenyi
resultado <- NemenyiTest(medida ~ grupo, data = datos)
# Ver los resultados
summary(resultado)
# O simplemente
resultado$Resultados
# Ver orden de medias (rangos)
resultado$Orden_Medias
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.