phyl.RMA {phytools} | R Documentation |
Phylogenetic reduced major axis (RMA) regression
Description
Phylogenetic reduced major axis (RMA) regression.
Usage
phyl.RMA(x, y, tree, method="BM", lambda=NULL, fixed=FALSE, h0=1.0)
## S3 method for class 'phyl.RMA'
coef(object, ...)
## S3 method for class 'phyl.RMA'
plot(x, ...)
Arguments
x |
vector with names. In the case of the S3 |
y |
vector with names. |
tree |
a phylogenetic tree in |
method |
method to obtain the correlation structure: can be |
lambda |
value of |
fixed |
logical value indicating whether or not |
h0 |
null hypothesis for |
object |
for |
... |
optional arguments for S3 methods. |
Details
Optionally jointly estimates \lambda
if method="lambda"
. Likelihood optimization of \lambda
is performed using optimize
on the interval (0,1).
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.
Note that some statistician think there is never a condition in which a reduced-major-axis regression is appropriate.
Value
An object of class "phyl.RMA"
consisting of a list with the following elements:
RMA.beta |
a vector of RMA regression coefficients. |
V |
a VCV matrix for the traits. |
lambda |
fitted value of |
logL |
log-likelihood ( |
test |
a vector containing results for hypothesis tests on |
resid |
a vector of residuals for |
Author(s)
Liam Revell liam.revell@umb.edu
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. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.
See Also
phyl.cca
, phyl.pca
, phyl.resid
Examples
## 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)
## plot fitted RMA
par(las=1,bty="n")
plot(fitted.rma,las=1,bty="n")