 # Log transform with O

Variables log-transform is a common method to obtain the elasticities or a requirement such as estimating a Cobb-Douglas or translog form production function. However, when we encounter the zero-valued observation, what should we do? Because log(0) is undefined.

A method that Macurdy and Pencavel (1986) introduced in their JPE paper is using log(x+1), log(x+0.001) or some variant thereof. It has long been the workhorse way to deal with those wayward zero-valued observations.

Someone may also ignore the presence of zero-valued observation by using the log(x), and let the chips fall where they may, meaning that you just drop those observation for which x=0. Apparently, if x is assigned experimentally, there is no harm in doing that. But in most cases, x will not be as good as random, which means that merely dropping those observation for which x=0 will introduce selection in you sample, which limits the external validity of our findings.

In addition, in some cases, it is unnecessary to use the log-transform, you can certainly use the x. Presumably, this is not an option if you are here reading this post.

Recently, Bellemare and Wichman (2018) introduced a new and improved version, i.e. Inverse Hyperbolic Sine transformation (IHS). The IHS transformation of x-formally denoted arsinh x, but usually denote it IHS(x) is such that:

$$IHS(X)=ln(x+\sqrt{x^2+1})$$

The beauty of the IHS transformation is that:

1. It behaves similar to log
2. It allows retaining zero-valued observations
3. It even allows retaining negative-valued observations. In Bellemare et al. (2013), for example, when they regressed marketable surplus (production minus consumption; this can take negative, zero, or positive values) on a number of variables, and found that the IHS transformation came in handy.

For more about the IHS transformation itself, see Burbidge et al. (JASA, 1988) and MacKinnon and Magee (IER, 1990). For applications, see Moss ans Shonkwiler (AJAE, 1993), Yen and Jones (AJAE, 1997), Pence (beJEAP, 2006), and the aforementioned Bellemare et al. (AJAE, 2013).

Reference: