Skip to content
Prev 13278 / 20628 Next

Adding additional factor to previously working MCMCglmm model kills it. Problem with priors? Help?

Hi Jarrod,

Thanks for the response.

If I am understanding correctly, would I then end up with the code below?
If species is incorporated in the random part, would I then not include it
as a fixed factor?

tree<-read.tree("Plethodontidae_comb61_PL.phy")
species<-c("D._carolinensis_KHK103", "D._fuscus_KHK142",
"D._ochrophaeus_WKS05", "D._ocoee_B_KHK62", "D._orestes_KHK129",
"D._monticola_A",  "D._santeetlah_11775", "P_cinereus", "P_cylindraceus",
"P_glutinosus", "P_hubrichti", "P_montanus", "P_punctatus", "P_richmondi",
"P_teyahalee", "P_virginia", "P_wehrlei")
pruned.tree<-drop.tip(tree,tree$tip.label[-match(species,
tree$tip.label)])# Prune tree to just include species of interest
sptree<-makeNodeLabel(pruned.tree, method="number", prefix="node") #rename
nodes to be unique
treeAinv<-inverseA(sptree, nodes="TIPS")$Ainv

dataset$species.ide<-dataset$species
random=~us(1+Temp):species.ide

prior<-list(G=list(G1=list(V=diag(2), nu=2, alpha.mu=c(0,0),
alpha.V=diag(2)*1000)), R=list(V=diag(1), nu=0.002))

model6<-MCMCglmm(LVO2~1+Temp+Acclm+Range+Mass+Sex+Acclm*Range,
random=random, data=dataset, family="gaussian",
ginverse=list(species=treeAinv), prior=prior, nitt=300000, burnin=25000,
thin = 1000, verbose=FALSE)

Alternatively, someone mentioned to me that to reduce model complexity I
could group the handful of species I have with smaller samples sizes and
label them all as "other" in a second species list ("New_spp"). When I
added this new species assortment as a fixed factor in my original model it
runs! Is this a reasonable thing to do?

Thanks, Tricia

On Wed, Apr 29, 2015 at 12:46 AM, Jarrod Hadfield <j.hadfield at ed.ac.uk>
wrote: