Learn R Programming

phytools (version 0.3-72.1)

pgls.Ives: Phylogenetic regression with intraspecific sampling error

Description

This function fits the phylogenetic regression model with within-species sampling error following Ives et al. (2007).

Usage

pgls.Ives(tree, X, y, Vx=NULL, Vy=NULL, Cxy=NULL, lower=c(1e-8,1e-8))

Arguments

tree
a phylogeny as an object of class "phylo".
X
a named vector containing a single independent variable (multiple independent variables to be added in future). X can contain the species means, or a single long vector containing the sample of values for each species. In the latter
y
vector the dependent variable. Can be species means or individual values, as for X.
Vx
sampling variances for X. If NULL, then the within-species variance is computed from the data assuming that individual samples, not species means, have been provided in X.
Vy
sampling variances for y. If NULL, then the within-species variance is computed from the data assuming that individual samples, not species means, have been provided in y.
Cxy
sampling covariances between X and y. This will also be computed from the data if Cxy==NULL. Note than in this case - but not for the calculation of Vx and Vy, the same number of observation
lower
vector specifying the lower bounds for estimation for sig2x and sig2y, respectively. (Must be >0.)

Value

  • A list with the following components:
  • betaa vector or matrix of regression coefficients.
  • sig2xfitted BM rate for X.
  • sig2yfitted BM rate for y.
  • afitted ancestral states for X and y.
  • logLlog-likelihood.
  • convergencea value for convergence. convergence=0 is good; see optim for more details.
  • messagea message for convergence.

Details

Presently only the bivariate regression model is implemented. Uses optim(...,method="L-BFGS-B") for optimization. Note that some problems have been reported with the optimization algorithm for this model, which is simple and thus may fail to find the ML solution.

References

Ives, A. R., P. E. Midford, and T. Garland Jr. (2007) Within-species measurement error in phylogenetic comparative methods. Systematic Biology, 56, 252--270.

See Also

brownie.lite, phylosig, phyl.resid