[R-sig-ME] Error using dredge with an MCMCglmm object

Jarrod Hadfield j.hadfield at ed.ac.uk
Sun Jan 6 17:00:00 CET 2013


Dear Theoni,

I'm not familiar with MuMIn so can't comment on the error. However, I  
would not advocate DIC for model comparison; see:  
https://stat.ethz.ch/pipermail/r-sig-mixed-models/2012q2/018096.html

Cheers,

Jarrod








Quoting Theoni Photopoulou <theoni.photopoulou at gmail.com> on Fri, 4  
Jan 2013 11:58:24 +0000:

> Dear list,
>
> I am using MCMCglmm to fit a model to metadata on learning in animals. The
> response is the proportion of animals in a group that solve a task, the
> random effects are the species and the study, and I have eight fixed
> effects. The dataset is quite small, at 62 observations. The model
> specification
> is as follows:
>
> # setting up the prior
>
> p.var <- var(I(subdata2$n_solve/subdata2$group_size), na.rm=TRUE)
>
> b <- 1e+08
>
> B1_V <- diag(9)*b; B1_mu <- rep(0,9); B1_V; B1_mu
>
> prior <- list(R=list(V=diag(1)*p.var*0.1, n=1, nu=0.002), G=list(G1=list(V
> =diag(1)*p.var*0.6, n=Gn1), G2=list(V=diag(1)*p.var*0.2, n=Gn2)), B=list(V=
> B1_V, mu=B1_mu))
>
>
> # fitting the model
>
> model <- MCMCglmm(cbind(n_solve, group_size-n_solve) ~ var1 + var2 + var3 +
> var4 + var5 + var6 + var7 + var8,
>
> family="multinomial2", random= ~animal + study,
>
> start=list(QUASI=TRUE),
>
> prior=prior, data=subdata2, pedigree=myreducedtree_3,
>
> thin=100, nitt=150000, burnin=50000, verbose=F, pr=T, pl=T, nodes="TIPS")
> The model converges and everything looks ok so I now want to do model
> selection. I read in the help file for the MuMIn package that it now
> accepts MCMCglmm objects with DIC as the rank function but I get an error
> message when I run the following code:
>
> model.dredge <- dredge(model, rank="DIC")
>
> Error in dredge(model, rank = "DIC") :
>
>   could not retrieve the call to 'global.model'
>
> I will do model selection manually if needs be, but it would be good not to
> have to. I also looked for a generic implementation of RJMCMC in R but
> didn't come up with anything. Any pointers or ideas on why this might not
> be working will be very much appreciated.
>
> Thanks in advance,
> Theoni
>
> --
> Theoni Photopoulou, Research Fellow
> Centre for Social Learning and Cognitive Evolution
> Bute Medical Building, University of St Andrews, Scotland KY16 9TS, UK
> tel. +44 1334 467230 / skype. theoni_p / email. tp14 at st-andrews.ac.uk
>
> The University of St Andrews is a charity registered in Scotland : No
> SC013532
> " Be silly. Be honest. Be kind " Ralph Waldo Emerson
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>


-- 
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