title: Set G in prior using MCMCglmm, with categorical response and phylogeny
body: <p>I am new to the MCMCglmm package in R, and rather new to glm models in general. I have a dataset of species traits and whether or not they have been introduced outside of their native range.</p>
  
  <p>I would like to test whether being introduced (as a binary 0/1 response variable) can be explained by any of the species traits. I would also like to correct for phylogeny between species.</p>
  
  <p>I was told that for a binary response I could use family =“threshold” and I should fix the residual variance at 1. But I am having some trouble with the other parameters needed for the prior.</p>
  
  <p>I've specified the R value for the random effects, but if I specify R I must also specify G and it is not clear to me how to decide the values for this parameter. I've tried putting default values but I get error messages:</p>
  
  <pre><code>Error in MCMCglmm(fixed, random = ~species, data = data2, family = "threshold",  : 
  prior$G has the wrong number of structures
  </code></pre>
  
  <p>I have read the help vignettes and course but have not found an example with a binary response, and it is not clear to me how to decide the values for the priors. This is what I have so far:</p>
  
  <pre><code>fixed=Intro_binary ~ Trait1+ Trait2 + Trait3 
  Ainv=inverseA(redTree1)$Ainv
  
  binary_model = MCMCglmm(fixed, random=~species, data = data, family = "threshold", ginverse=list(species=Ainv),
   prior = list( 
      G = list(),    #not sure about the parameters for random effects.
      R = list(V = 1, fix = 1)),  #to fix the residual variance at one
    nitt = 60000, burnin = 10000) 
  </code></pre>
  
  <p>Any help or feedback would be greatly appreciated!</p>