Revision 9ae1e67cb5e13c5bbc731a5fc56a0053182f16b0 authored by Matthias Templ on 11 February 2020, 16:20:02 UTC, committed by cran-robot on 11 February 2020, 16:20:02 UTC
1 parent 775c7e1
Raw File
lmCoDaX.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lmCoDaX.R
\name{lmCoDaX}
\alias{lmCoDaX}
\alias{ilrregression}
\alias{robilrregression}
\title{Classical and robust regression of non-compositional (real) response on
compositional predictors}
\usage{
lmCoDaX(y, X, method = "robust")
}
\arguments{
\item{y}{The response which should be non-compositional}

\item{X}{The compositional predictors as a matrix, data.frame or numeric
vector}

\item{method}{If robust, LTS-regression is applied, while with method equals
\dQuote{classical}, the conventional least squares regression is applied.}
}
\value{
An object of class \sQuote{lts} or \sQuote{lm} and two summary
objects.
}
\description{
Delivers appropriate inference for regression of y on a compositional matrix
X.
}
\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.
}
\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")
}
\references{
Filzmoser, P., Hron, K., Thompsonc, K. (2012) Linear regression
with compositional explanatory variables. \emph{Journal of Applied
Statistics}, 39, 1115-1128.
}
\seealso{
\code{\link{lm}}
}
\author{
Peter Filzmoser
}
\keyword{models}
back to top