I am having a problem with
plotRateThroughTime(). For some reason I could not identify, the function does not seem to use the correct node for calculating average rates. Comparing with the outputs of all other functions, I can see the age of the clade should be older and the average rates should be higher. Other functions seem to work fine. I include the tree and event data files as well as a RateThroughTime plot (so you can see the error) and a mean phylorate plot (so you can see the correct ages and rates).
# Import tree
Teiidae_tree <- read.tree("dated_tree.nwk") %>%
ladderize(.)
# Create bammdata files
bammdata_Teiidae <- getEventData("Teiidae_tree.tre",
"event_data.txt",
burnin = 0.1)
# Mean Phylorate
plot.bammdata(bammdata_Teiidae,
breaksmethod = "jenks",
spex = "netdiv",
lwd = 3,
pal = "temperature",
labels = T,
legend = T,
cex = 0.4)
#Plot rate through time
plotRateThroughTime(bammdata_Teiidae,
ratetype = "auto",
useMedian = F,
intervalCol = "red",
avgCol = "red",
node = getMRCA(Teiidae_tree,
c("Aspidoscelis_maximus",
"Aspidoscelis_rodecki")),
nodetype = "include",
ylim = c(0,1.1),
xlim = c(30,0),
cex.lab = 1.0,
cex.axis = 1.5)