RMA | R Documentation |
Computes the coefficients of the reduced major axis (RMA) of a set of points.
RMA(x, y = NULL)
x , y |
the coordinates of the points given in the usual way in R. |
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.
a matrix with two rows and two columns named alpha and beta for the intercepts and slopes, respectively.
Emmanuel Paradis
https://mathworld.wolfram.com/LeastSquaresFittingPerpendicularOffsets.html
x <- 1:1000
y <- x + rnorm(1000, 5)
RMA(x, y) # same than RMA(cbind(x, y))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.