Learn R Programming

bayou (version 2.1.1)

OUphenogram: Experimental phenogram plotting function for set of model of model parameters

Description

Experimental phenogram plotting function for set of model of model parameters

Usage

OUphenogram(pars, tree, dat, SE = 0, regime.col = NULL, ...)

Arguments

pars

A bayou formatted parameter list

tree

A tree of class 'phylo'

dat

A named vector of tip data

SE

Standard error of the tip states

regime.col

A named vector of colors equal in length to the number of regimes

...

Optional arguments passed to phenogram()

Details

This is an experimental plotting utility that can plot a phenogram with a given regime painting from a parameter list. Note that it uses optimization of internal node states using matrix inversion, which is very slow for large trees. However, what is returned is the maximum likelihood estimate of the internal node states given the model, data and the parameter values.

Examples

Run this code
# NOT RUN {
tree <- sim.bdtree(n=50)
tree$edge.length <- tree$edge.length/max(branching.times(tree))
prior <- make.prior(tree, dists=list(dk="cdpois", dsig2="dnorm", 
           dtheta="dnorm"), param=list(dk=list(lambda=5, kmax=10), 
             dsig2=list(mean=1, sd=0.01), dtheta=list(mean=0, sd=3)), 
               plot.prior=FALSE)
pars <- priorSim(prior, tree, plot=FALSE, nsim=1)$pars[[1]]
pars$alpha <- 4
dat <- dataSim(pars, model="OU", phenogram=FALSE, tree)$dat
OUphenogram(pars, tree, dat, ftype="off")
# }

Run the code above in your browser using DataLab