How to perform a MANOVA with a random effect in R? I performed an experiment where I raised different families coming from two different source populations, where each family was split up into a different treatments. After the experiment I measured several traits on each individual. Now I would like to have an overall and hence multivariate statistic that tests for an effect of either treatment or source as well as their interaction but correcting for family effects.
So, basically I would like to perform a MANOVA with a random effect, which would translate to something like this:
 manova(data~source*treatment+Error(family))

However, the standard R MANOVA function does not support random effects and I was unable to find another function that would do the trick. So I would like to ask if anyone has a suggestion that may help.
Thanks!
 A: Chapter 16 of Snijders and Bosker 2012 solve the problem by creating a dummy variable to represent the different response variables ($Y$), stacking the data (see quote below), and adding an additional level to your model to represent different response variables within subject.
They include example R code at this site:
http://www.stats.ox.ac.uk/~snijders/ch16.r
And the chapter can be previewed on Google here:
http://books.google.com/books?id=N1BQvcomDdQC&lpg=PP1&pg=PA282#v=onepage&q&f=false
I tested this approach using univariate data and got nearly identical results as a traditional manova.
From page 284 of Snijders and Bosker 2012:
"To represent the multivariate data in the multilevel approach, three nesting levels are used. The first level is that of the dependent variables indexed by $h = 1,\ldots,m$, the second level is that of the individuals $i = 1,\ldots,n_j$, and the third level is that of the groups, $j = 1,\ldots,N$. So each measurement of a dependent variable on some individual is represented by a separate line in the data matrix, containing the values $i$, $j$, $j$, $Y_{hij}$, $x_{1ij}$, and those of the other explanatory variables. 
The multivariate model is formulated as hierarchical linear model using the same trick as in Section 15.1.3. Dummy variables $d_1,\ldots,d_m$ are used to indicate the dependent variables, just as in formula (14.2). Dummy variable $d_h$ is $1$ or $0$, depending on whether the data line refers to dependent variable $Y_j$ or to one of the other dependent variables."
