Skip to contents

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

Usage

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

Arguments

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

Value

a matrix

Details

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.

References

  • 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.

Author

  • Lukas Dargel

  • Rodrigue Nasr

Examples

res <- lmCoDa(YIELD ~ PRECIPITATION + ilr(TEMPERATURES), data = head(rice_yields,20))
Impacts(res, Xvar = "TEMPERATURES")
#>               YIELD
#> LOW    -0.002055032
#> MEDIUM -0.098267445
#> HIGH    0.100322476