[R] multinomial MCMCglmm

Vaniscotte vanamelie at gmail.com
Sun Oct 7 00:26:54 CEST 2012


Dear all,

I would like to add mixed effects in a multinomial model and I am trying
to use MCMCglmm for that.

The main problem I face: my data set is a trapping data set, where the
observation at each trap (1 or 0 for several species) have been
aggregated per trapline (i.e. 25 traps). Therefore we have a proportion
of presence/absence for each species per trapline.

ex:
  ID_line mesh habitat Apsy Mygl Crle Crru Miag Miar Mimi Mumu Misu Soar
Somi
11  028S6A   28   copse    2    0    0    0    0    0    0    0    0
0    0
12  028S6B   28   copse    1    1    0    0    0    0    0    0    0
0    0
13  028S6C   28   hedge    2    0    0    4    0    0    0    0    0
0    0
14  028S6D   28   hedge    1    0    0    7    0    0    0    0    1
0    0
15  028S6E   28   hedge    7    0    0    1    0    0    0    0    0
0    0
  empty
11    28
12    28
13    24
14    21
15    22

When I run the following:

 > test1 <-
MCMCglmm(fixed=cbind(Apsy,Mygl,Crle,Crru,Miag,Miar,Mimi,Mumu,Misu,Soar,Somi,empty)~habitat,random=~mesh,family="multinomial12",data=metalSmA[,c(2,9,23:34)],rcov=~us(trait):units)


I got some error concerning the variance structure:

 > "ill-conditioned G/R structure: use proper priors if you haven't or
rescale data if you have"

I guess that the problem comes from the nature of my observations which
are frequencies instead of 0/1 per unit

Does someone know if a multinomial model fitted with MCMCglmm can handle
those frequencies table and how to specify the good G/R variance
structures?


Regards

Amélie Vaniscotte




More information about the R-help mailing list