title: Using car::Anova package for a doubly-multivariate MANOVA in R
body: <p>I'm trying to run a repeated-measures MANOVA in R, which also contains a number of dependent variables (key outcome variables of behavioural tasks). The repeated-measures are due to a cross-over design, in which individuals took a drug and placebo (in randomised order). </p>
  
  <p>The code I'm running looks like this:</p>
  
  <pre><code>imatrix &lt;- matrix(c(
    1, 0, 0, 0, 0, 0, 1, 
    1, 0, 0, 0, 0, 0, -1, 
    0, 1, 0, 0, 0, 0, 1, 
    0, 1, 0, 0, 0, 0, -1,
    0, 0, 1, 0, 0, 0, 1, 
    0, 0, 1, 0, 0, 0, -1,
    0, 0, 0, 1, 0, 0, 1, 
    0, 0, 0, 1, 0, 0, -1,
    0, 0, 0, 0, 1, 0, 1, 
    0, 0, 0, 0, 1, 0, -1,
    0, 0, 0, 0, 0, 1, 1, 
    0, 0, 0, 0, 0, 1, -1
  ), 12, 7, byrow=TRUE)
  colnames(imatrix) &lt;- c("BCST", "CGT", "AST", "AGN", "DDT", "FERT", "NAC")
  (imatrix &lt;- list(measure=imatrix[,1:6], condition=imatrix[,7]))
  contrasts(condition_factor) &lt;- matrix(c(-1,1,1, -1), ncol=2)
  
  doubly.mod&lt;-lm(cbind(bcst_nac$totPersErr,bcst_placebo$totPersErr,cantab_nac$CGT.Delay.aversion,cantab_placebo$CGT.Delay.aversion,cantab_nac$AST.Switching.cost..Mean..correct.,cantab_placebo$AST.Switching.cost..Mean..correct.,cantab_nac$AGN.Affective.response.bias..Mean.,cantab_placebo$AGN.Affective.response.bias..Mean.,aucs_NAC,aucs_placebo,fert_nac$FERTACCHA,fert_placebo$FERTACCHA)~1))
  Manova(doubly.mod, imatrix=imatrix, type =3)
  </code></pre>
  
  <p>The result is this error: Error in Anova.III.mlm(mod, SSPE, error.df, idata, idesign, icontrasts,  : 
    (list) object cannot be coerced to type 'double'
  However, when I change imatrix back from a list to a matrix, I get this error response:</p>
  
  <p>Error in do.call(cbind, imatrix) : second argument must be a list</p>
  
  <p>I've based this off the example from the car::Anova package about doubly multivariate analyses. Please let me know if you can help, or if I can add anything to make this question clearer. </p>