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).
make.pgls(tree, formula, data, control=list())
A bifurcating phylogenetic tree, in ape
“phylo” format.
A model formula; see lm
for details on
formulae; the interface is the same here.
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.
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).
Richard G. FitzJohn
Freckleton R.P. 2012. Fast likelihood calculations for comparative analyses. Methods in Ecology and Evolution 3: 940-947.