[R-sig-ME] Help request - MCMCglmm model with repeat measures and phylogenetic component

Tricia Markle markl033 at umn.edu
Mon Oct 27 04:25:44 CET 2014


Hello All,


I am a PhD student working on a project attempting to gauge the degree of
“acclimation ability” in salamanders. Specifically, I am looking to see if
wide-ranging species have a greater degree of plasticity in oxygen
consumption (i.e. metabolic rate) at different acclimation temperatures
than narrow-ranging species.


I have multiple species in the model and need to account for phylogenetic
relationships. In addition, the same individuals were used in multiple
trials so I need to account for repeat measures.


I have spent a considerable amount of time putting together a working
MCMCglmm model based on available literature. However, being somewhat of a
novice with this particular type of model, I am hoping to get some further
insight from anyone familiar with the script and model set-up.


I have included the R script and a few specific questions below.


Any help that you could provide would be immensely appreciated!

*R script:*


 library(MCMCglmm)
dataset<-read.csv(file="RData.csv", head=TRUE)
dataset$Range<-as.factor(dataset$Range)
str(dataset)

#Phylogeny Component
tree<-read.tree("Plethodontidae_comb61_PL.phy")
species<-c("D._carolinensis_KHK103", "D._fuscus_KHK142",
"D._imitator_KHK05", "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
plot(sptree, show.node.label=TRUE)

treeAinv<-inverseA(sptree)$Ainv

prior<-list(G=list(G1=list(V=1, n=0.002), G2=list(V=1, n=0.002)),
R=list(V=1, n=0.002))

#For Repeat Measures
dataset$ID<-dataset$animal
head(dataset)
p.var<-var(dataset$LVO2, na.rm=TRUE)

#Model 1 with Range Size
model1<-MCMCglmm(LVO2~1+Acclm+Temp+LMass+Sex+Range+Acclm*Temp*Range,
random=~animal+ID, data=dataset, ginverse=list(species=treeAinv),
nodes="ALL", prior=prior, nitt=300000, burnin=25000, thin = 1000,
verbose=FALSE)


summary(model1)
plot(model1$Sol)
plot(model1$VCV)
autocorr(model1$VCV)
posterior.mode(model1$VCV)

*Questions:*

   1. *Relating to Repeat Measures. *Each salamander was used in 3
   acclimation treatments (randomly assigned order), so I need to account for
   repeat measures. Currently I have “id” added as a random term, but is it
   instead more appropriate to use some sort of multi-response model?
   2. *The big question.* Where I am *really* stuck is how best to get
   results specific to my main question of interest - which is whether the
   slope of oxygen consumption (VO2) by test temperature varies as a
   consequence of acclimation temperature, and whether this relationship
   differs in wide versus narrow ranging species (or with latitudinal breadth).
   As a recap, salamanders were acclimated at 3 different temperatures (6, 14
   and 22C) and for each acclimation temperature, oxygen consumption was
   measured at 3 test temperatures (5, 15, 25C) (i.e. 9 measures for each
   individual). This creates a slope of test temperatures for each acclimation
   temp. I need some way of comparing differences in slopes between
   acclimation temperatures and plotting these results so that you can tell
   which one is which (i.e., whether wide ranging or narrow ranging species
   have greater plasticity). I currently have the model set up as a single
   response of oxygen consumption (VO2), with numerous fixed factors (and
   individual salamander as a random factor). I see the question I seek as
   potentially relating to a 3-way interaction of Acclm*Temp*Range – but I
   don’t know how to interpret/view this?


   1. *Finally, any glaring omissions or mistakes in the R script as it
   stands?*



*Sincerely, *

*Tricia Markle*

*PhD Candidate, Conservation Biology Program*

*University of Minnesota*

	[[alternative HTML version deleted]]



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