yule.cov {ape}R Documentation

Fits the Yule Model With Covariates

Description

This function fits by maximum likelihood the Yule model with covariates, that is a birth-only model where speciation rate is determined by a generalized linear model.

Usage

yule.cov(phy, formula, data = NULL)

Arguments

phy

an object of class "phylo".

formula

a formula specifying the model to be fitted.

data

the name of the data frame where the variables in formula are to be found; by default, the variables are looked for in the global environment.

Details

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:

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.

Value

A NULL value is returned, the results are simply printed. The output includes the deviance of the null (intercept-only) model and a likelihood-ratio test of the fitted model against the null model. Note that the deviance of the null model is different from the one returned by yule because of the different parametrizations.

Author(s)

Emmanuel Paradis

References

Paradis, E. (2005) Statistical analysis of diversification with species traits. Evolution, 59, 1–12.

See Also

branching.times, diversi.gof, diversi.time, ltt.plot, birthdeath, bd.ext, yule

Examples

### a simple example with some random data
data(bird.orders)
x <- rnorm(45) # the tree has 23 tips and 22 nodes
### the standard-error for x should be as large as
### the estimated parameter
yule.cov(bird.orders, ~ x)
### another example with a tree that has a multichotomy
data(bird.families)
y <- rnorm(272) # 137 tips + 135 nodes
yule.cov(bird.families, ~ y)

[Package ape version 5.8 Index]