plotMCMCTree: Plot distribution from MCMCTree node estimations

Description Usage Arguments Value Examples

View source: R/plotMCMCTree.R

Description

Estimate the offset and scale paramaters of a soft-tailed cauchy distribution and output trees for MCMCTree input

Usage

1
2
plotMCMCTree(parameters, method = c("skewT", "skewNormal", "cauchy", "gamma",
  "bound"), title, upperTime, lowerTime = 0, plotMCMCTreeData = TRUE)

Arguments

parameters

output parameters from node estimation function

method

one of skewT, skewNormal, cauchy, gamma, or bound

title

title for the plot

upperTime

maxmimum age for x-axis plot

lowerTime

maxmimum age for x-axis plot (default = 0)

plotMCMCTreeData

If TRUE returns co-ordinates to plot distributions to allow greater flexibility (default = TRUE)

Value

plot of the specified prior applied for a node

If plotMCMCTreeData=TRUE x and y coordinates of distributions from 0 to upperTime on x axis

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
apeTree <- read.tree(text="((((human, (chimpanzee, bonobo)), gorilla), (orangutan, sumatran)), gibbon);")
monophyleticGroups <- list()
monophyleticGroups[[1]] <- c("human", "chimpanzee", "bonobo", "gorilla", "sumatran", "orangutan", "gibbon")
monophyleticGroups[[2]] <- c("human", "chimpanzee", "bonobo", "gorilla")
monophyleticGroups[[3]] <- c("human", "chimpanzee", "bonobo")
monophyleticGroups[[4]] <- c("sumatran", "orangutan")
minimumTimes <- c("nodeOne"=15, "nodeTwo"=6, "nodeThree"=8, "nodeFour"=13) / 10
maximumTimes <- c("nodeOne"=30, "nodeTwo"=12, "nodeThree"=12, "nodeFour"=20) / 10
cauchy <- estimateCauchy(minAge=minimumTimes[1], maxAge=maximumTimes[1], monoGroups=monophyleticGroups[[1]], offset=0.5, phy=apeTree, plot=F)
plotMCMCTree(parameters=cauchy$parameters, method="cauchy", title="cauchyPlot", upperTime=maximumTimes[1]+1)
bound <- estimateBound(minAge=minimumTimes[1], maxAge=maximumTimes[1], monoGroups=monophyleticGroups[[1]], minProb=0.1, rightTail=0.1, phy=apeTree, plot=F)
plotMCMCTree(parameters=bound$parameters, method="bound", title="uniformPlot", upperTime=maximumTimes[1]+1)

PuttickMacroevolution/MCMCTreeR documentation built on Nov. 20, 2017, 2:22 p.m.