[R-sig-ME] multinominal2 MCMCglmm: predicted estimates are not bounded
jdelia82 at gmail.com
Mon Jul 3 19:52:41 CEST 2017
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.
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=
ggplot(data, aes(x = AVErainS17, y = propdry, color = careduration)) +
ylab("mortality") + xlab("rain")+
geom_smooth(data=data, aes(x = AVErainS17, y = predictions[,1]))+
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models