[R-sig-ME] multinominal2 MCMCglmm: predicted estimates are not bounded

Jesse Delia jdelia82 at gmail.com
Mon Jul 3 19:52:41 CEST 2017


Dear list,

I'm having issues predicting and plotting values from a model estimated
using MCMCglmm, and was hoping I might be able to trouble someone for help?

My model uses cbind to calculate a proportional response (proportion of an
egg-clutch w/ dry eggs), which should be bounded 0–1. However, I get really
large predicted values (+30) and negative values using a multinomial2
MCMCglmm. I am not sure if this is because of my model specifications, or
how I am using the predict function. I've tried googling, reading course
notes, and meeting with stats folks at my U without any luck.

I have the model results and data sheet saved in an R file, but its too big
to upload to this list. If you think you can have a look let me know and
Ill send it along.

I greatly appreciate any help.

Jesse
PhD student

####
Code:

inv.phylo<-inverseA(tree,nodes="TIPS",scale=TRUE)

priorT<-list(R=list(V=1e-10,nu=-1), G=list(G1=list(V=1,nu=1,alpha.mu=0,
alpha.V=100), G2=list(V=1,nu=1,alpha.mu=0,alpha.V=100)))

modelT<-MCMCglmm(cbind(dry, clutchsize - dry)~careduration*AVErainS17,
random= ~species+animal, family= "multinomial2", ginverse=list(animal=
inv.phylo$Ainv), prior=priorT, data=data, nitt=1000000, burnin=50000, thin
= 300, pr=TRUE, saveX=TRUE, saveZ= TRUE)

predictions <- as.data.frame(predict(modelT, interval="confidence", type=
"response"))

ggplot(data, aes(x = AVErainS17, y = propdry, color = careduration)) +

  ylab("mortality") + xlab("rain")+

  geom_smooth(data=data, aes(x = AVErainS17, y = predictions[,1]))+

  geom_point(aes(shape=species), size=4)

	[[alternative HTML version deleted]]



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