TukeyTest | R Documentation |
Performs Tukey's Honest Significant Difference (HSD) test for all pairwise comparisons after fitting an ANOVA model. This post hoc method uses the studentized range distribution and is appropriate when variances are equal across groups and observations are independent.
TukeyTest(modelo, alpha = 0.05)
modelo |
An object of class |
alpha |
Significance level (default is 0.05). |
Tukey's test controls the family-wise error rate and is widely used when group comparisons have not been planned in advance.
Advantages: - Strong control of Type I error rate. - Ideal for balanced designs with equal variances.
Disadvantages: - Assumes equal variances and sample sizes. - Less powerful with heteroscedasticity.
An object of class "tukey"
and "comparaciones"
, containing:
Resultados
: A data frame of pairwise comparisons with mean differences, critical value, p-value, and significance level.
Promedios
: A named numeric vector of group means.
Orden_Medias
: A character vector with group names ordered from highest to lowest mean.
Metodo
: A character string indicating the method used ("Tukey").
Tukey, J. W. (1949). "Comparing individual means in the analysis of variance." Biometrics, 5(2), 99–114. <https://doi.org/10.2307/3001913>
data(d_e, package = "Analitica")
mod <- aov(Sueldo_actual ~ as.factor(labor), data = d_e)
resultado <- TukeyTest(mod)
summary(resultado)
plot(resultado)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.