x1 <- c(6, 5, 8, 4, 7, 3, 1, 2, 2, 5, 3, 2)
x2 <- c(7, 9, 6, 9, 9, 3, 6, 3, 3, 1, 1, 3)
treatment <- factor(rep(c("T1", "T2", "T3"), times = c(5, 3, 4)))
data <- data.frame(Treatment = treatment, x1 = x1, x2 = x2)
# Perform MANOVA
manova_result <- manova(cbind(x1, x2) ~ Treatment, data = data)
# Summary with Wilks' Lambda
summary(manova_result, test = "Wilks")
## Df Wilks approx F num Df den Df Pr(>F)
## Treatment 2 0.03619 17.027 4 16 1.283e-05 ***
## Residuals 9
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The Wilks’ Lambda value is 0.03619, which indicates that a very small proportion of variance in the dependent variables is not explained by the treatment effect.
The approximate F-statistic is 17.027, with degrees of freedom: num Df = 4, den Df = 16. The p-value associated with this test is extremely small (Pr(>F) ≈ 1.283e-05), which is far below both the significance levels of α=0.01 and α=0.05.
Thus, we reject the null hypothesis that there are no differences between treatments at both significance levels.