I am trying to run a simple nested manova with two levels of nesting, Sires, and Dams within Sires. The goal is to extract the among sires covariance matrix and secondarily, the among Dams within Sires covariance matrix. Both sires and dams are random effects. At present there are four dependent variables, but that may change. This is part of a larger bootstrapping project, so efficiency and the ability to automate the extraction are worth considering. Because it is a bootstrap computationally simpler approaches may be better, even if slightly biased (as long as the bias is consistent)
Two other important points. (1) We will be comparing the sire/dam data set to a similar data set that has only sires (dams have a single offspring, so “dams” becomes residuals). (2) The data are mildly unbalanced (one of the reasons for using a bootstrap approach). As a result of the differences in the structure of the two data sets and the unbalance using estimates of the variance components based on the sums of squares from summary.manova()$SS is leading to an unacceptably large bias. It is clear we need to use a better method (ReML?) to estimate the covariance matrices! The code we use for running the manova: Y <- cbind(Pupal_Mass, Dev_Time, Dry_Weight, Rel_Fitness) sire <- factor(Sire) dam<- factor(Dam) fit <- manova(Y ~ sire + dam:sire) sireSS <- summary(fit)$SS$sire etc. the sire covariance matrix = (MS(sires) – MS(dams)/(offspring/sire) which gives us the correct answer with balanced data, but of course not with unbalanced data. -- Charles Goodnight Professor of Biology University of Vermont Burlington Vermont 802 656-8521 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.