mcmc.plot: plot the output from transformPhylo.MCMC

Description Usage Arguments Value Author(s) Examples

View source: R/mcmc.plot.R

Description

Plots a histogram of the estimated parameter and a trace of the results

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
mcmc.plot(
  mcmc.input,
  y.limit = NULL,
  x.limit = NULL,
  label.text = NULL,
  cex.axis = 1,
  cex.labels = 0.7,
  col.hist = "green4",
  col.trace = "navy"
)

Arguments

mcmc.input

an object of class "mcmc.motmot" output from transformPhylo.MCMC

y.limit

the limits for the y axes for the plots

x.limit

the limits for the x axes for the plots

label.text

the labels for the two plots defaults to '(a)' etc., for the histogram and '(b)' etc., for the trace plot

cex.axis

character expansion for the plot axis labels

cex.labels

character expansion for the plot axis names

col.hist

colour for the histogram bars

col.trace

colour for the trace plot

Value

Two plots showing the histogram of the estimated parameter value and a trace of the MCMC estimation

Author(s)

Mark Puttick

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(motmot)
data(anolis.tree)
data(anolis.data)
attach(anolis.data)
male.length <- matrix(Male_SVL, dimnames=list(rownames(anolis.data)))
sortedData <- sortTraitData(anolis.tree, male.length)
phy <- sortedData$phy
male.length <- sortedData$trait
phy.clade <- extract.clade(phy, 182)
male.length.clade <- as.matrix(male.length[match(phy.clade$tip.label, rownames(male.length)),])
## not run
# please note, this model will be need to run for longer to achieve convergence
# lambda.mcmc <- transformPhylo.MCMC(y=male.length.clade, phy=phy.clade, 
# model="lambda", mcmc.iteration=100, burn.in=0.1)
# mcmc.plot(lambda.mcmc)

PuttickMacroevolution/motmot documentation built on June 5, 2020, 7 p.m.