title: Meaning of "trait" in MCMCglmm
body: <p>Like in <a href="https://stats.stackexchange.com/questions/156683/when-and-why-do-i-have-to-use-trait-for-multinomial-multilevel-models-with-mcm">this post</a> I'm struggling with the notation of <code>MCMCglmm</code>, especially what is meant by <code>trait</code>. My code ist the following</p>
  
  <pre><code>library("MCMCglmm")
  
  set.seed(123)
  y &lt;- sample(letters[1:3], size = 100, replace = TRUE)
  x &lt;- rnorm(100)
  id &lt;- rep(1:10, each = 10)
  dat &lt;- data.frame(y, x, id)
  
  mod &lt;- MCMCglmm(fixed = y ~ x, random = ~us(x):id,
              data = dat,
              family = "categorical")
  </code></pre>
  
  <p>Which gives me the error message <code>For error structures involving catgeorical data with more than 2 categories pleasue use trait:units or variance.function(trait):units.</code> (!sic). If I would generate dichotomous data by <code>letters[1:2]</code>, everything would work fine. So what is meant by this error message in general and "trait" in particular?</p>
  
  <hr>
  
  <p><strong>Edit 2016-09-29:</strong>
  From <a href="https://stats.stackexchange.com/questions/156683/when-and-why-do-i-have-to-use-trait-for-multinomial-multilevel-models-with-mcm">the linked question</a> I copied <code>rcov = ~ us(trait):units</code> into my call of <code>MCMCglmm</code>. And from <a href="https://stat.ethz.ch/pipermail/r-sig-mixed-models/2010q3/004006.html" rel="nofollow noreferrer">https://stat.ethz.ch/pipermail/r-sig-mixed-models/2010q3/004006.html</a> I took (and slightly modified it) the prior 
  <code>list(R = list(V = diag(2), fix = 1), G = list(G1 = list(V = diag(2), nu = 1, alpha.mu = c(0, 0), alpha.V = diag(2) * 100)))</code>. Now my model actually gives results:</p>
  
  <pre><code>MCMCglmm(fixed = y ~ 1 + x, random = ~us(1 + x):id, 
           rcov = ~ us(trait):units, prior = prior, data = dat,
           family = "categorical")
  </code></pre>
  
  <p>But still I've got a lack of understanding what is meant by <code>trait</code> (and what by <code>units</code> and the notation of the prior, and what is <code>us()</code> compared to <code>idh()</code> and ...).</p>
  
  <p><strong>Edit 2016-11-17:</strong>
  I think <code>trait</code> is synoym to "target variable" or "response" in general or <code>y</code> in this case. In the formula for <code>random</code> there is nothing on the left side of <code>~</code> <a href="ftp://cran.r-project.org/pub/R/web/packages/MCMCglmm/vignettes/CourseNotes.pdf" rel="nofollow noreferrer">"because the response is known from the fixed effect specification."</a> So the rational behind specifiying that <code>rcov</code> needs <code>trait:units</code> could be that it is alread defined by the <code>fixed</code> formula, what <code>trait</code> is (<code>y</code> in this case).</p>