[R] Unbalanced Manova
Spencer Graves
spencer.graves at pdf.com
Sun Apr 2 04:40:59 CEST 2006
What have you tried? I just did help.searhc("manova"), which led me
to manova and summary.manova, which contained a balanced example, which
I unbalanced as follows:
tear <- c(6.5, 6.2, 5.8, 6.5, 6.5, 6.9, 7.2, 6.9, 6.1, 6.3,
6.7, 6.6, 7.2, 7.1, 6.8, 7.1, 7.0, 7.2, 7.5, 7.6)
gloss <- c(9.5, 9.9, 9.6, 9.6, 9.2, 9.1, 10.0, 9.9, 9.5, 9.4,
9.1, 9.3, 8.3, 8.4, 8.5, 9.2, 8.8, 9.7, 10.1, 9.2)
opacity <- c(4.4, 6.4, 3.0, 4.1, 0.8, 5.7, 2.0, 3.9, 1.9, 5.7,
2.8, 4.1, 3.8, 1.6, 3.4, 8.4, 5.2, 6.9, 2.7, 1.9)
rate <- factor(gl(2,10), labels=c("Low", "High"))
additive <- factor(gl(2, 5, len=20), labels=c("Low", "High"))
DF <- data.frame(tear, gloss, opacity, rate, additive)
fit <- manova(cbind(tear, gloss, opacity) ~ rate * additive, DF)
f18 <- manova(cbind(tear, gloss, opacity) ~ rate * additive, DF[1:18,])
summary(fit, test="Wilks") # ANOVA table of Wilks' lambda
> summary(fit, test="Wilks") # ANOVA table of Wilks' lambda
Df Wilks approx F num Df den Df Pr(>F)
rate 1 0.3819 7.5543 3 14 0.003034 **
additive 1 0.5230 4.2556 3 14 0.024745 *
rate:additive 1 0.7771 1.3385 3 14 0.301782
Residuals 16
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> summary(f18, test="Wilks") # ANOVA table of Wilks' lambda
Df Wilks approx F num Df den Df Pr(>F)
rate 1 0.3743 6.6880 3 12 0.006637 **
additive 1 0.5825 2.8671 3 12 0.080857 .
rate:additive 1 0.7012 1.7047 3 12 0.218966
Residuals 14
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
>
If you would like further help from this listserve, PLEASE do read
the posting guide! "www.R-project.org/posting-guide.html" and provide a
self-contained example of what you tried, explaining why it does not
meet your needs.
hope this helps,
spencer graves
Naiara S. Pinto wrote:
> Dear all,
>
> I need to do a Manova but I have an unbalanced design. I have
> morphological measurements similar to the iris dataset, but I don't have
> the same number of measurements for all species. Does anyone know a
> procedure to do Manova with this kind of input in R?
>
> Thank you very much,
>
> Naiara.
>
> --------------------------------------------
> Naiara S. Pinto
> Ecology, Evolution and Behavior
> 1 University Station A6700
> Austin, TX, 78712
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
More information about the R-help
mailing list