Learn R Programming

phytools (version 1.2-0)

phyl.RMA: Phylogenetic reduced major axis (RMA) regression

Description

This function performs phylogenetic RMA regression.

Usage

phyl.RMA(x, y, tree, method="BM", lambda=NULL, fixed=FALSE, h0=1.0)
# S3 method for phyl.RMA
coef(object, ...)
# S3 method for phyl.RMA
plot(x, ...)

Value

An object of class "phyl.RMA" consisting of a list with the following components:

RMA.beta

a vector of RMA regression coefficients.

V

a VCV matrix for the traits.

lambda

fitted value of \(\lambda\) (method="lambda" only).

logL

log-likelihood (method="lambda" only).

test

a vector containing results for hypothesis tests on \(\beta\).

resid

a vector of residuals for y given x.

Arguments

x

vector with names. In the case of the S3 plot method x is an object of class "phyl.RMA".

y

vector with names.

tree

a phylogenetic tree in "phylo" format.

method

method to obtain the correlation structure: can be "BM" or "lambda".

lambda

value of lambda for fixed \(\lambda\).

fixed

logical value indicating whether or not \(\lambda\) should be optimized using likelihood.

h0

null hypothesis for \(\beta\). Defaults to 1.0. Note that a null hypothesis of 0.0 is not allowed.

object

for coef method, an object of class "phyl.RMA".

...

optional arguments for S3 methods.

Author

Liam Revell liam.revell@umb.edu

Details

Optionally jointly estimates \(\lambda\) if method="lambda". Likelihood optimization of \(\lambda\) is performed using optimize on the interval (0,1). Note that some statistician think there is never a condition in which a reduced-major-axis regression should be used.

The statistical hypothesis testing is based on Clarke (1980; reviewed in McArdle 1988), which differs from some other implementations of non-phylogenetic major axis regression in R.

References

Clarke, M. R. B. (1980) The reduced major axis of a bivariate sample. Biometrika, 67, 441-446.

McArdle, B. H. (1988) The structural relationship: Regression in biology. Can. J. Zool., 66, 2329-2339.

Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.

See Also

phyl.cca, phyl.pca, phyl.resid

Examples

Run this code
## load data from Garland et al. (1992)
data(mammal.data)
data(mammal.tree)
## pull out & log transform variables
lnBodyMass<-setNames(log(mammal.data$bodyMass),
	rownames(mammal.data))
lnHomeRange<-setNames(log(mammal.data$homeRange),
	rownames(mammal.data))
## fit RMA regression & print results
fitted.rma<-phyl.RMA(lnBodyMass,lnHomeRange,
	mammal.tree)
print(fitted.rma)

Run the code above in your browser using DataLab