Fixed Age for MCMCtree analysis input
estimateFixed.RdProduce fixed age trees for MCMCtree analysis
Usage
estimateFixed(
minAge,
phy,
monoGroups,
writeMCMCtree = FALSE,
MCMCtreeName = "estimateFixed.tre"
)Arguments
- minAge
vector of fixed age bounds for nodes matching order in monoGroups
- phy
fully resolved phylogeny in ape format
- monoGroups
list with each element containing species that define a node of interest
- writeMCMCtree
logical whether to write tree in format that is compatible with MCMCTree to file
- MCMCtreeName
MCMCtree.output file name
Value
list containing node estimates for each distribution
"parameters" estimated parameters for each node
"apePhy" phylogeny in ape format with node labels showing node distributions
"MCMCtree" phylogeny in MCMCtreeR format
"nodeLabels" node labels in MCMCtreeR format
If writeMCMCtree=TRUE tree in MCMCtree format in file "MCMCtreeName" written to current working directory
Examples
data(apeData)
attach(apeData)
#> The following objects are masked from apeData (pos = 3):
#>
#> apeTree, maximumTimes, minimumTimes, monophyleticGroups
#> The following objects are masked from apeData (pos = 4):
#>
#> apeTree, maximumTimes, minimumTimes, monophyleticGroups
## extract taxon descending from calibrated nodes 8, 10, 11, 13
## these nodes can be visualised using plot.phylo
## and nodelabels from ape
monophyleticGroups <- tipDes(apeData$apeTree, c(8,10,11,13))
minimumTimes <- c("nodeOne"=15, "nodeTwo"=6,
"nodeThree"=8, "nodeFour"=13) / 10
maximumTimes <- c("nodeOne" = 30, "nodeTwo" = 12,
"nodeThree"=12, "nodeFour" = 20) / 10
estimateFixed(minAge=minimumTimes[1],
monoGroups=monophyleticGroups[[1]], phy=apeTree)$MCMCtree
#> Warning: Length of node.label does not match number of nodes.
#>
#> 1 7 1
#>
#> 1 ((((human,(chimpanzee,bonobo)'=1.5')'=1.5',gorilla)'=1.5',(orangutan,sumatran)'=1.5')'=1.5',gibbon)'=1.5';
#>
#> 1 //end of file