Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

lmCoDaX

Classical and robust regression of non-compositional (real) response on compositional predictors


Description

Delivers appropriate inference for regression of y on a compositional matrix X.

Usage

lmCoDaX(y, X, method = "robust")

Arguments

y

The response which should be non-compositional

X

The compositional predictors as a matrix, data.frame or numeric vector

method

If robust, LTS-regression is applied, while with method equals “classical”, the conventional least squares regression is applied.

Details

Compositional explanatory variables should not be directly used in a linear regression model because any inference statistic can become misleading. While various approaches for this problem were proposed, here an approach based on the pivot coordinates is used.

Value

An object of class ‘lts’ or ‘lm’ and two summary objects.

Author(s)

Peter Filzmoser

References

Filzmoser, P., Hron, K., Thompsonc, K. (2012) Linear regression with compositional explanatory variables. Journal of Applied Statistics, 39, 1115-1128.

See Also

Examples

## How the total household expenditures in EU Member
## States depend on relative contributions of 
## single household expenditures:
data(expendituresEU)
y <- as.numeric(apply(expendituresEU,1,sum))
lmCoDaX(y, expendituresEU, method="classical")
lmCoDaX(y, expendituresEU, method="robust")

robCompositions

Compositional Data Analysis

v2.3.0
GPL (>= 2)
Authors
Matthias Templ [aut, cre] (<https://orcid.org/0000-0002-8638-5276>), Karel Hron [aut] (<https://orcid.org/0000-0002-1847-6598>), Peter Filzmoser [aut] (<https://orcid.org/0000-0002-8014-4682>), Kamila Facevicova [ctb], Petra Kynclova [ctb], Jan Walach [ctb], Veronika Pintar [ctb], Jiajia Chen [ctb], Dominika Miksova [ctb], Bernhard Meindl [ctb], Alessandra Menafoglio [ctb] (<https://orcid.org/0000-0003-0682-6412>), Alessia Di Blasi [ctb], Federico Pavone [ctb], Gianluca Zeni [ctb]
Initial release
2020-11-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.