[R] multinomial MCMCglmm

Vaniscotte vanamelie at gmail.com
Thu Sep 13 07:54:50 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 consits of a trapping data set, 
where the observation at eah trap (1 or 0 for each species) have been 
aggregated per traplines. 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 when running regarding 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 observation whih 
are frequencies rather than 0/1 per unit

Does someone know if a multinomial model fitted with MCMCglmm can 
handdle 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