The model fitted is a generalization of the Yule model where the
speciation rate is determined by:
$$\ln\frac{\lambda_i}{1 - \lambda_i} = \beta_1 x_{i1} + \beta_2 x_{i2}
+ \dots + \alpha $$
where \(\lambda_i\) is the speciation rate for species i,
\(x_{i1}, x_{i2}, \dots\) are species-specific
variables, and \(\beta_1, \beta_2, \dots, \alpha\)
are parameters to be estimated. The term on the left-hand side above
is a logit function often used in generalized linear models for
binomial data (see family
). The above model can
be written in matrix form:
$$\mathrm{logit} \lambda_i = x_i' \beta$$
The standard-errors of the parameters are computed with the second
derivatives of the log-likelihood function. (See References for other
details on the estimation procedure.)
The function needs three things:
a phylogenetic tree which may contain multichotomies;
a formula which specifies the predictors of the model described
above: this is given as a standard R formula and has no response (no
left-hand side term), for instance: ~ x + y
, it can include
interactions (~ x + a * b
) (see formula
for details);
the predictors specified in the formula must be accessible to
the function (either in the global space, or though the data
option); they can be numeric vectors or factors. The length and the
order of these data are important: the number of values (length) must
be equal to the number of tips of the tree + the number of nodes. The
order is the following: first the values for the tips in the same
order than for the labels, then the values for the nodes sequentially
from the root to the most terminal nodes (i.e., in the order given by
phy$edge
).
The user must obtain the values for the nodes separately.
Note that the method in its present implementation assumes that the
change in a species trait is more or less continuous between two nodes
or between a node and a tip. Thus reconstructing the ancestral values
with a Brownian motion model may be consistent with the present
method. This can be done with the function ace
.