Description Usage Arguments Details Value Functions See Also Examples
Calculates orthogonal polynomial coefficients using stats::lm
1 2 3 4 5 6 7 8 9 10 11 |
x |
coo_single, coo_list or mom_tbl |
degree |
polynomial degree for the fit ( |
raw |
|
drop_coo |
|
from_coo, to_coe |
column names |
... |
for generics. Useless here. |
nb_pts |
number of points to sample and on which to calculate polynomials |
from_coe |
column name for inverse method |
Curves must be registered on a bookstein baseline, with the first coordinates on (-0.5, 0) and the last on (0.5, 0). Use coo_bookstein
A polynomial of degree n
use this fit:
y = a_{0} + a_{1}x^1 + a_{...}x^{...} + a_{n}x^{n}
And thus returns n+1
coefficients. The +1
being $a_0$ ie the intercept.
Orthogonal polynomials are also called Legendre's polynomials. They are preferred over natural polynomials since adding a degree does not change lower order coefficients.
In retired Momocs, baseline was free and not necessarily Bookstein. Not sure this was really helpful but I'm sure this overcomplicated coding. If your shapes are not registered on Bookstein coordinates, you will be messaged (not for coo_single though)
a list with components when applied on a single shape:
coeff
the coefficients (including the intercept)
ortho
whether orthogonal or natural polynomials were fitted
degree
degree of the fit (could be retrieved through coeff
though)
baseline1
the first baseline point (so far the first point)
baseline2
the second baseline point (so far the last point)
r2
the r2 from the fit
mod
the raw lm model
opoly_i
: inverse opoly method
Other polynomials:
npoly()
Other morphometrics:
dfourier()
,
efourier()
,
npoly()
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.