lmCoDa | R Documentation |
This is a thin wrapper around lm()
followed by ToSimplex()
, which
allows to create a lmCoDa object in one step.
lmCoDa(formula, data, ...)
formula |
as in |
data |
as in |
... |
arguments passed on to |
an object of class "lm" and "lmCoDa" if the formula include at least one log-transformation
Lukas Dargel
lm()
, ToSimplex()
, compositions::ilr()
, compositions::alr()
# XY-compositional model
res <- lmCoDa(
ilr(cbind(left, right, extreme_right)) ~
ilr(cbind(Educ_BeforeHighschool, Educ_Highschool, Educ_Higher)),
data = head(election, 20))
# X-compositional model
res <- lmCoDa(YIELD ~ PRECIPITATION + ilr(TEMPERATURES), data = head(rice_yields, 20))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.