[R-sig-ME] Predict and plot lines estimated from MCMCglmm?

Malcolm Fairbrother M.Fairbrother at bristol.ac.uk
Wed Jun 7 11:54:14 CEST 2017

Hi Jesse,

This is an application in a completely unrelated substantive domain of
research, but you can find code to plot (ggplot) the results of MCMCglmm
fits in the Supplementary Material here:

Maybe that will help you out.

Best wishes,

Dr Malcolm Fairbrother
Reader in Global Policy and Politics
School of Geographical Sciences  •  Cabot Institute  •  Centre for
Multilevel Modelling
University of Bristol

*As of later in 2017:*
Professor of Sociology
Umeå University

> Date: Mon, 5 Jun 2017 12:10:37 -0400
> From: Jesse Delia <jdelia82 at gmail.com>
> To: r-sig-mixed-models at r-project.org
> Subject: [R-sig-ME] Predict and plot lines estimated from MCMCglmm?
> Dear list,
> I am a grad student and am trying to plot the results of a comparative
> field experiment. I've been struggling to figure out how predict and plot
> lines estimated using MCMCglmm. I've read the course notes, spent several
> days googling, and have been looking for downloadable script from
> publications, with no luck. Does anyone know how to (or could point me in
> the direction for an example) to plot lines for each of a 2-level predictor
> after accounting for random effects using MCMCglmm?
> I have pasted my script below, for which I am trying to evaluate how
> evolutionary changes in parental care alter offspring survival. Ideally,
> I'd like to plot a line for each type of 'careduration' (binary predictor)
> over the raw data after accounting for random effects of phylogeny and
> within species variation:
> Prior<- list(R=list(V= 1e 10,nu=-1), G=list(G1=list(V=1,nu=1,alpha.mu=0,
> alpha.V=25^2), G2=list(V=1,nu=1,alpha.mu=0,alpha.V=25^2)))
> Model1<-MCMCglmm(cbind(mortality, clutchsize-mortality) ~careduration*
> raindpo3, random=~species+animal, family ="multinomial2", ginverse=list(
> animal=inv.phylo$Ainv), prior=prior1, data=data, nitt=3000000, burnin=10
> 00000, thin = 500, pr=TRUE)
> One additional question: my response is a proportional estimate of egg
> clutch mortality. There are lots of zeros, as many clutches did not
> experience any mortality -- can "multinomial2" handle proportional data
> with lots of zeros? I get similar results with the above model as I do
> using a beta-binomial model using glmmADMB (and will present both models in
> the publication).
> Thanks for your time,
> Jesse

	[[alternative HTML version deleted]]

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