| SidakTest | R Documentation |
Performs pairwise comparisons using the Sidak correction to adjust p-values and control the family-wise error rate in multiple testing scenarios. This method assumes independence between comparisons and is slightly less conservative than Bonferroni.
SidakTest(modelo, comparar = NULL, alpha = 0.05)
modelo |
An |
comparar |
Character vector with the name(s) of the factor(s) to compare:
- One name: main effect (e.g., "treatment" or "A")
- Several names: interaction (e.g., |
alpha |
Significance level (default 0.05). |
The Sidak procedure adjusts the significance level to maintain an overall alpha across all pairwise tests, providing an effective post hoc tool following ANOVA or similar global tests.
Advantages: - Controls the family-wise error rate under independence assumption. - Slightly more powerful than Bonferroni. - Simple to compute and interpret.
Disadvantages: - Assumes independence of tests (may not hold in correlated data). - Less robust when variances are unequal or data are non-normal.
An object of class "sidak" and "comparaciones" containing:
Resultados: a data.frame with columns Comparacion, Diferencia, SE, t_value,
p_value (unadjusted), p_ajustada (Sidak), Valor_Critico (critical difference), and Significancia.
Promedios: a named vector of group means as defined by comparar.
Orden_Medias: group names ordered from highest to lowest mean.
Metodo: "Sidak-adjusted t-test".
Termino: the term being compared (e.g., "A", "B", or "A:B").
MSerror, df_error, N: useful for plots with error bars.
Sidak, Z. (1967). "Rectangular confidence regions for the means of multivariate normal distributions." Journal of the American Statistical Association, 62(318), 626–633.
data(d_e, package = "Analitica")
mod <- aov(Sueldo_actual ~ as.factor(labor), data = d_e)
resultado <- SidakTest(mod)
summary(resultado)
plot(resultado)
# RCBD
mod <- aov(Sueldo_actual ~ as.factor(labor) + Sexo, data = d_e)
res <- SidakTest(mod, comparar = "as.factor(labor)")
summary(res); plot(res) # plot usara p_value
# Factorial
mod2 <- aov(Sueldo_actual ~ as.factor(labor) * Sexo, data = d_e)
resAB <- SidakTest(mod2, comparar = c("as.factor(labor)","Sexo"))
summary(resAB, n = Inf); plot(resAB, horizontal = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.