sim.character(tree, pars, x0=0, model="bm", br=NULL)
ape
"bm"
, "ou"
,
"bbm"
, "mk"
and "meristic"
; see Details.model
argument are sufficient, you can provide your own
function. The function must have arguments x0
, t
,
which are the state at the base of a bsim.char
in geiger
in particular. The main difference
here is that for continuous characters, this does not use the
variance-covariance matrix, which can make it much faster for very
large trees. I believe that this approach is similar to fastBM
in phytools
.
model="bm"
: Brownian Motion. Takes a single
parameter, representing the rate of diffusion (must be positive)model="ou"
: Ornstein-Uhlenbeck process. Takes a vector
of three parameters, representing the rate of diffusion, strength of
restoring force, and the "optimum" value. The first two parameters
must be non-negative, and the rate of diffusion must be positive.model="bbm"
: Bounded Brownian Motion. Takes a vector
of three parameters (s2
,c
,d
), representing
the rate of diffusion, lower and upper bound, respectively. The
rate of diffusion must be positive. % TODO: What is the orientation of the matrix: \itemmodel="mk"
: Mk model (seemake.mkn
). Takes a Q
matrix as its argument. The elementQ[i,j]
represents the
rate of transition from statei
to statej
, and the
diagonal elements must be such thatrowSums(Q)
is zero.model="meristic"
: A special case of the Mk model, where the
trait is meristic and character transitions are only possible
between adjacent states. There are three parameters (k
,up
,down
), representing the number of states, and rate
of character change up (from statei
toi+1
) and down.