Hello Amelie, I don't have an answer to your question, but I just wanted to point out this page I noticed recently ( http://hlplab.wordpress.com/2009/05/07/multinomial-random-effects-models-in-r/), which might be helpful.
I'm also interested in figuring out how to do a multinomial glmm, so if you find out anything I'd be happy to hear more about it! Based on what I've found so far it seems like doing a multinomial glmm is not very straightforward, unfortunately... Best, Steve Politzer-Ahles Message: 94 > Date: Wed, 12 Sep 2012 09:47:12 +0200 > From: Vaniscotte <vaname...@gmail.com> > To: r-help@r-project.org > Subject: [R] multinomial MCMCglmm > Message-ID: <50503e00.4060...@gmail.com> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > 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 > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.