Learn R Programming

tigers (version 0.1-3)

RMA: Reduced Major Axis

Description

Computes the coefficients of the reduced major axis (RMA) of a set of points.

Usage

RMA(x, y = NULL)

Value

a matrix with two rows and two columns named alpha and beta for the intercepts and slopes, respectively.

Arguments

x, y

the coordinates of the points given in the usual way in R.

Author

Emmanuel Paradis

Details

The RMA is found by solving a polynomial equation of degree two, so there are actually two solutions which are both returned. It is usually straightforward to find the appropriate solution.

References

https://mathworld.wolfram.com/LeastSquaresFittingPerpendicularOffsets.html

Examples

Run this code
x <- 1:1000
y <- x + rnorm(1000, 5)
RMA(x, y) # same than RMA(cbind(x, y))

Run the code above in your browser using DataLab