[R-sig-ME] predictions from MCMCglmm multinomial model

Jarrod Hadfield j.hadfield at ed.ac.uk
Thu Feb 6 16:56:59 CET 2014


Hi Achaz,

Perhaps this is now sorted. If you have marginal=NULL in the call to  
predict then you will still get a prediction for each herder. However,  
since you have no fixed effects in the model except trait (such that  
all herders in a region have the same fixed effect structure) then you  
can pull out the prediction for a single herder in each region, and  
this will be equivalent to a prediction for each region.

Cheers,

Jarrod

Quoting Achaz Hardenberg <achaz.hardenberg at gmail.com> on Thu, 12 Dec  
2013 10:27:58 +0100:

> Dear all,
> I have fitted the following model:
>
> sheep-predation.mcmc<-MCMCglmm(cbind(Puma,Fox,Dog,Surv.sheep)~trait-1,random=~Region,rcov=us(trait):units, family=  
> "multinomial4",data=carnivorosAllsheep,verbose=FALSE)
> where Puma,Fox and Dog are the counts of sheep predated by these  
> predators, as denounced by herders (one row per herder); Surv.sheep  
> are the number of sheep remaining after the predations. herders are  
> grouped in 4 different Regions which I specified as a random effect.
>
> I would like to get the predicted probability of predation with  
> credible intervals for each Region and for each species of predator.  
> I tried:
> predict(sheep-predation.mcmc,marginal=~Region,interval="confidence”), but it  
> gives me the prediction for each herder in each Region, rather than  
> the global estimate for each region/species.
>
> Any help is greatly appreciated!
> cheers,
>
> Achaz von Hardenberg
> Gran Paradiso National Park
>
>
>
>
>
>
>
> 	[[alternative HTML version deleted]]
>
>



-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



More information about the R-sig-mixed-models mailing list