Learn R Programming

MCMCtreeR (version 1.1)

estimateCauchy: Estimate Cauchy Distribution for MCMCtree

Description

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

Usage

estimateCauchy(minAge, maxAge, phy, monoGroups, scale = 1.5,
  offset = 50, estimateScale = TRUE, minProb = 0, maxProb = 0.975,
  plot = FALSE, pdfOutput = "cauchyPlot.pdf", writeMCMCtree = FALSE,
  MCMCtreeName = "cauchyInput.tre")

Arguments

minAge

vector of minimum age bounds for nodes matching order in monoGroups

maxAge

vector of maximum 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

scale

scale value for cauchy distribution (default = 1.5) (c in PAML manual page 49)

offset

offset value for cauchy distribution (default = 50) (p in PAML manual page 49)

estimateScale

logical specifying whether to estimate scale with a given shape value (default = TRUE)

minProb

probability of left tail (minimum bound) - default to hard minimum (minProb=0)

maxProb

probability of right tail (maximum bound. default = 0.975)

plot

logical specifying whether to plot to PDF

pdfOutput

pdf output file name

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 MCMCtree format

  • "nodeLabels" node labels in MCMCtreeR format

If plot=TRUE plot of distributions in file 'pdfOutput' written to current working directory

If writeMCMCtree=TRUE tree in MCMCtree format in file "MCMCtreeName" written to current working directory