2
$\begingroup$

In many papers, the dependent variable is transformed by taking natural log. For instance, consider the following model:

$$\newcommand{\Cov}{{\rm Cov}} \ln(\text{Y}) = \alpha + \beta\, X_1 + \epsilon $$

I understand that the interpretation of $\beta$ is the percentage change in $Y$ for a given unit change in $X$. However, some papers comment on the direction of relationship between $X$ and $Y$ (and not $\ln(Y)$) on the basis of sign of $\beta$.

Through a simple simulation exercise, I have found out that it may be erroneous to comment on the direction of relationship between $Y$ and $X$ on the basis of sign of $\beta$ in the above equation. Specifically, the signs of $\Cov (X,Y)$ and $\Cov (X, \ln(Y))$ may be different.

I ask this question specifically in the context of regressions (particularly multiple regression). I am actually concerned with listing down different scenarios in which Beta coefficient may change sign from X and Y to logY and X. I am working on a review paper in the context of corporate finance and I would like to highlight this issue of log transformation of Y (or X for that matter) which may further result in different signs of beta coefficients when compared to relationship between X and Y.

$\endgroup$
3
$\begingroup$

It's possible for the correlation to change sign from $X$ and $Y$ to $\log Y$ and $X$. One easy class of examples is when a transformation dampens an outlier that was exerting major leverage. Another class of examples is whenever an outlier is created by a transformation.

The Stata code used to produce this example should be fairly transparent.

clear
input y x
1       2   
2       3
3       4
4       5
5       6
6       7 
10      1
end 
gen log_y = log(y) 
corr y log_y x 

enter image description here

Correlations:

             |        y    log_y        x
-------------+---------------------------
           y |   1.0000
       log_y |   0.9352   1.0000
           x |  -0.0516   0.2424   1.0000

The example is not especially blatant, but that is much of the point. You don't need extraordinary or outrageously pathological datasets to see this effect.

The question is unclear, as is that on Statalist, on precisely what kind of model is being considered, but talk of covariance to me implies plain correlation and regression, so there is no obvious need to invoke any wider framework.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Very rightly pointed out, Nick. $\endgroup$ – Prateek Bedi Dec 20 '18 at 10:49
  • 1
    $\begingroup$ You have indeed pointed out the case of outliers and I completely agree that outliers are one reason behind this phenomenon. I am now looking for more such reasons specially when X and Y are NOT INDEPENDENT and the probability of a sign change thereof. Please let me know if you can further thoughts to share. $\endgroup$ – Prateek Bedi Dec 20 '18 at 10:52
  • 2
    $\begingroup$ Outliers are just an easy case. Another could be relationships with a turning point where the transformation weakens the effect of one limb and strengthens the effect of the other. $\endgroup$ – Nick Cox Dec 20 '18 at 11:06
0
$\begingroup$

Since the logarithm is a monotonic function, if $Cov(X,Y) > 0$, then $Cov(X, log(Y)) > 0$.

That said, it's possible in a regression model to obtain different findings. Unlike least squares, the sign of the regression coefficient in a bivariate GLM is not necessarily of the same sign as the covariance. Rather, a GLM obtains a regression covariate by iteratively reweighting the least squares parameter to find the maximum likelihood, at least in the case of Poisson regression (which is also called a log linear model). The reason for this is: in a Poisson probability model, the variance of the response is higher when the mean is higher, so in domains where the mean response achieves larger values, the Poisson model downweights large residuals.

It's possible, therefore, to generate bimodal data so that the OLS slope is positive but the Poisson GLM (log linear model) slope is negative.

| cite | improve this answer | |
$\endgroup$
  • 2
    $\begingroup$ The opening statement is incorrect. Please see my answer. $\endgroup$ – Nick Cox Dec 19 '18 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.