make.classe  R Documentation 
Prepare to run ClaSSE (Cladogenetic State change Speciation and Extinction) on a phylogenetic tree and character distribution. This function creates a likelihood function that can be used in maximum likelihood or Bayesian inference.
make.classe(tree, states, k, sampling.f=NULL, strict=TRUE,
control=list())
starting.point.classe(tree, k, eps=0.5)
tree 
An ultrametric bifurcating phylogenetic tree, in

states 
A vector of character states, each of which must be an
integer between 1 and 
k 
The number of states. (The maximum now is 31, but that can easily be increased if necessary.) 
sampling.f 
Vector of length 
strict 
The 
control 
List of control parameters for the ODE solver. See
details in 
eps 
Ratio of extinction to speciation rates to be used when choosing a starting set of parameters. The procedure used is based on Magallon & Sanderson (2001). 
The ClaSSE model with k = 2
is equivalent to but a different
parameterization than the BiSSEness model.
The GeoSSE model can be constructed from ClaSSE
with k = 3
; see the example below.
make.classe
returns a function of class classe
. The
arguments and default values for this function are:
f(pars, condition.surv=TRUE, root=ROOT.OBS, root.p=NULL, intermediates=FALSE)
The arguments of this function are explained in make.bisse. The speciation rate parameters are lambda_ijk, ordered with k changing fastest and insisting on j < k.
With more than 9 states, lambda_ijk and q_ij can be ambiguous (e.g. is q113 1>13 or 11>3?). To avoid this, the numbers are zero padded (so that the above would be q0113 or q1103 for 1>13 and 11>3 respectively). It might be easier to rename the arguments in practice though. More humanfriendly handling of large speciation rate arrays is in the works.
starting.point.classe
produces a firstguess set of parameters,
ignoring character states.
Unresolved clade methods are not available for ClaSSE.
Tree simulation methods are not yet available for ClaSSE.
Emma E. Goldberg
FitzJohn R.G., Maddison W.P., and Otto S.P. 2009. Estimating traitdependent speciation and extinction rates from incompletely resolved phylogenies. Syst. Biol. 58:595611.
Goldberg E.E. and Igic B. Tempo and mode in plant breeding system evolution. In review.
Maddison W.P., Midford P.E., and Otto S.P. 2007. Estimating a binary character's effect on speciation and extinction. Syst. Biol. 56:701710.
Magallon S. and Sanderson M.J. 2001. Absolute diversification rates in angiospem clades. Evol. 55:17621780.
MagnusonFord, K., and Otto, S.P. 2012. Linking the investigations of character evolution and species diversification. American Naturalist, in press.
constrain
for making submodels, find.mle
for ML parameter estimation, and mcmc
for MCMC
integration. The help page for find.mle
has further
examples of ML searches on full and constrained BiSSE models. Things
work similarly for ClaSSE, just with different speciation parameters.
make.bisse
, make.bisseness
,
make.geosse
, make.musse
for similar models
and further relevant examples.
## Due to a change in sample() behaviour in newer R it is necessary to
## use an older algorithm to replicate the previous examples
if (getRversion() >= "3.6.0") {
RNGkind(sample.kind = "Rounding")
}
## GeoSSE equivalence
## Same tree simulated in ?make.geosse
pars < c(1.5, 0.5, 1.0, 0.7, 0.7, 2.5, 0.5)
names(pars) < diversitree:::default.argnames.geosse()
set.seed(5)
phy < tree.geosse(pars, max.t=4, x0=0)
lik.g < make.geosse(phy, phy$tip.state)
pars.g < c(1.5, 0.5, 1.0, 0.7, 0.7, 1.4, 1.3)
names(pars.g) < argnames(lik.g)
lik.c < make.classe(phy, phy$tip.state+1, 3)
pars.c < 0 * starting.point.classe(phy, 3)
pars.c['lambda222'] < pars.c['lambda112'] < pars.g['sA']
pars.c['lambda333'] < pars.c['lambda113'] < pars.g['sB']
pars.c['lambda123'] < pars.g['sAB']
pars.c['mu2'] < pars.c['q13'] < pars.g['xA']
pars.c['mu3'] < pars.c['q12'] < pars.g['xB']
pars.c['q21'] < pars.g['dA']
pars.c['q31'] < pars.g['dB']
lik.g(pars.g) # 175.7685
lik.c(pars.c) # 175.7685
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.