make.pgls {diversitree}R Documentation

Phylogenetic Generalised Least Squares

Description

Generate the likelihood function that underlies PGLS (Phylogenetic Generalised Least Squares). This is a bit of a misnomer here, as you may not be interested in least squares (e.g., if using this with mcmc for Bayesian inference).

Usage

make.pgls(tree, formula, data, control=list())

Arguments

tree

A bifurcating phylogenetic tree, in ape “phylo” format.

formula

A model formula; see lm for details on formulae; the interface is the same here.

data

A data frame containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from which this function is called. That may perform badly with reconciling with species names, however.

control

A list of control parameters. Currently the only option is the key “method” which can be "vcv" for the traditional variance-covariance approach (slow for large trees) or "contrasts" for the contrasts-based approach outlined in Freckleton (2012).

Author(s)

Richard G. FitzJohn

References

Freckleton R.P. 2012. Fast likelihood calculations for comparative analyses. Methods in Ecology and Evolution 3: 940-947.


[Package diversitree version 0.9-16 Index]