Impacts | R Documentation |

This function computes elasticities and semi-elasticities for CoDa regression model. where we have to distinguish four cases:

Y and X are both compositional: this leads to an elasticity

Y is compositional and X is scalar: this leads to a semi-elasticity

Y is scalar and X is compositional: this leads to a semi-elasticity

Y and X are both scalar: this case is not implemented as it leads to constant marginal effects

```
Impacts(object, Xvar = NULL, obs = 1)
```

`object` |
an object of class "lmCoDa" |

`Xvar` |
a character indicating the name of one explanatory variable |

`obs` |
a numeric that refers to the indicator of one observation |

The mathematical foundation for elasticity computations in CoDa model come from Morais and Thomas-Agnan (2021). Dargel and Thomas-Agnan (2024) present further results and illustrations.

a matrix

Lukas Dargel

Rodrigue Nasr

Dargel, Lukas and Christine Thomas-Agnan, “Pairwise share ratio interpretations of compositional regression models”, Computational Statistics & Data Analysis 195 (2024), p. 107945

Morais, Joanna and Christine Thomas-Agnan. "Impact of covariates in compositional models and simplicial derivatives." Austrian Journal of Statistics 50.2 (2021): 1-15.

```
res <- lmCoDa(YIELD ~ PRECIPITATION + ilr(TEMPERATURES), data = head(rice_yields,20))
Impacts(res, Xvar = "TEMPERATURES")
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.