This function fits a so-called Mk model for discrete character evolution. It is primarily designed to be used inside of make.simmap
.
Two plot
methods are available. plot.fitMk
plots an object of class "fitMk"
returned by fitMk
. plot.gfit
plots an object of class "gfit"
from geiger's fitDiscrete
function. Both plots portray the fitted model using a graph of arrows connecting states.
fitMk(tree, x, model="SYM", fixedQ=NULL, ...)
# S3 method for fitMk
plot(x, ...)
# S3 method for gfit
plot(x, ...)
an object of class "phylo"
.
a vector of tip values for species; names(x)
should be the species names. In the case of plot.fitMk
, an object of class "fitMk"
.
model. See make.simmap
or ace
for details.
fixed value of transition matrix Q
, if one is desired.
optional arguments, including pi
, the prior distribution at the root node (defaults to pi="equal"
). For plot
method optional arguments include (but may not be limited to): signif
, the number of digits for the rates to be plotted; main
, a character vector of length two with the headings for each subplot; cex.main
, cex.traits
, and cex.rates
, font sizes for the various text elements of the plot; and show.zeros
, a logical argument specifying whether or not to plot arrows with the ML estimated transition rate is not different from zero (with tolerance specified by the optional argument tol
).
An object of class "fitMk"
. In the case of plot.fitMk
, a plotted Mk model.
Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.