help compreg

Title

compreg -- Command to estimate a compositional regression with isometric log-ratio (ILR) transformation of the components

Syntax

compreg depvar [varlist], comp(varlist2) [options]

ilr Saves the isometric log-ratio (ILR) transformations in the dataset

Description

compreg estimates a compositional regression with isometric log-ratio (ILR) transformation of the components. Compositional regression with isometric log-ratio (ILR) transformation is a statistical method used when dealing with compositional data, independent variables represent parts of a whole and sum up to a constant, e.g. 1, 100%, or any number (1440 for the minutes in a day). Such data are common in multiple fields, for example economics, environment, ecology, in which data are often proportions or percentages. The challenge with compositional data is their constrained nature, which can lead to spurious correlations and statistical issues if standard regression techniques are applied directly. The ILR transformation is a solution to this problem. It converts the compositional data into log-ratios, removing the constant sum constraint and allowing the data to be analysed in a Euclidean space. This transformation facilitates the use of standard statistical methods, such as linear regression, while preserving the relative information in the data. ILR-based compositional regression can be used to understand relationships between parts of a composition, as it provides a more accurate and meaningful analysis than traditional methods applied to individual components.

compreg computes a isometric log-ratio (ILR) transformation of the different components and estimates a linear regression for each set of ILRs using the command regression. compreg requires ilr to be installed.

varlist2 must include the set of variables (n>2) for the components. The programme checks the sum of varlist2 adds up to the same number and reports an error if it is not the case.

Options

Main

ilr saves the isometric log-ratio (ILR) transformed variables in the dataset.

Remarks

The command compreg requires ilr.

Example

use http://fmwww.bc.edu/repec/bocode/g/gdp.dta, clear

Compositional regression with GDP as dependent variable and with the components agriculture industry services as independent variables.

. compreg GDP, comp(agriculture industry services)

Compositional regression with GDP as dependent variable, with the components agriculture industry services as independent variables, and population as control variable.

. compreg GDP population, comp(agriculture industry services)

Compositional regression with GDP as dependent variable, with the components agriculture industry services as independent variables, and population as control. Save the ILRs in the dataset.

. compreg GDP population, comp(agriculture industry services) ilr

Author

Giacomo Zanello

University of Reading

Reading, UK

If you use the command, please consider citing this software as follows:

Giacomo Zanello, 2024. "Command to estimate a compositional regression with isometric log-ratio (ILR) transformation of the components" Statistical Software Components, Boston College Department of Economics.

Last updated

1 February 2024