Skip to content

Linear regression with transformed dependent variable

This Stata package runs regressions with log or power transformations of the dependent variable on a list of covariates and computes semi-elasticities and elasticities for a set of specified covariates.

The predicted value of the untransformed dependent variable can be calculated at specified values of the covariates.

The transformations supported by this package (log and power) are the only choices that result in estimates that do not depend on the measurement units (scaling) of the data, characterized by Thakral and Tô (2024). For an illustration of the problems that arise when using other popular transformations such as log(y+1) or the inverse hyperbolic sine, see wreckitreg.

References

The package implements the recommendations of the following paper, which shows that log and power are the only transformations for OLS that result in estimates that do not depend on the scaling of the data:

Formulas for the semi-elasticities and elasticities can be found in the paper above, while formulas for predicted values can be found in the paper below, which establishes analogous results for generalized linear models:

  • "Scale Equivariance in Regressions" (Thakral and Tô 2024)

Authors

We welcome any comments or interest in contributing to further develop the package. Please contact: