hansen.fit {ouch}R Documentation

Hansen model of evolution along a phylogenetic tree

Description

These functions relate to the Hansen model for phylogenetic evolution.

hansen.fit
fits the parameters α, σ, and theta of this model.
hansen.prof
computes the profile likelihood of the α parameter.
hansen.dev
generates random deviates from the Hansen model.

Usage

hansen.fit(data, node, ancestor, times, regimes = NULL,
           interval = c(0, 100), tol = 1e-12)
hansen.prof(alpha, data, node, ancestor, times, regimes = NULL)
hansen.dev(n = 1, node, ancestor, times, regimes = NULL,
           alpha, sigma, theta)

Arguments

data Phenotypic data for extant species, i.e., at the terminal ends of the phylogenetic tree.
node Character vector of names of the nodes.
ancestor Specification of the topology of the phylogenetic tree. This is in the form of a character vector of node names, one for each node in the tree. The i-th name is that of the ancestor of the i-th node. The root node is distinguished by having no ancestor (i.e., NA).
times A vector of nonnegative numbers, one per node in the tree, specifying the time at which each node is located. The root node should be assigned time 0.
regimes A vector of codes, one for each node in the tree, specifying the selective regimes hypothesized to have been operative. Corresponding to each node, enter the code of the regime hypothesized for the branch segment terminating in that node. For the root node, because it has no branch segment terminating on it, the regime specification is irrelevant.
interval The interval which will be searched for the optimal α. By default, 0.001 < α < 20.
tol Convergence tolerance.
n Number of pseudorandom data sets to generate.
alpha Value of α to use.
sigma Value of σ to use.
theta Value of theta to use.

Details

The vector regimes should be of class factor. If regimes is unspecified or NULL, all lineages are assumed to be evolving under a single, global OU process with a global optimum. In this case, rather than estimate the character state at the root node, the algorithm assumes that the character state at the root value follows the stationary distribution for the OU process. In general, it is impossible to identify both the root character state and the global optimum using contemporaneous data.

Value

hansen.fit returns a list containing the following elements:

alpha Maximum likelihood estimate of α. Note that if α lies against one of the constraints (see interval above), then this is not a maximum-likelihood estimate.
sigma Maximum likelihood estimate of σ.
theta Maximum likelihood estimate of theta.
loglik Log likelihood.
deviance -2 loglik.
aic Akaike information criterion.
sic Schwartz information criterion (=BIC)
df Number of parameters estimated (= 3 + number of regimes).
alpha the specified alpha
loglik the log likelihood
deviance the deviance (-2 log L)
aic the Akaike information criterion value
sic the Schwartz information criterion value

Note that when α=0 exactly, the computed log likelihood does not agree with the Brownian motion model.
hansen.dev returns a list of n simulated data sets. Each data set corresponds exactly to the data used in the call to hansen.fit.

Author(s)

Aaron A. King <kingaa at umich dot edu>

References

Butler, M.A. and A.A. King (2004) Phylogenetic comparative analysis: a modeling approach for adaptive evolution. American Naturalist 164:683-695, 2004.


[Package ouch version 1.2-4 Index]