Cindy Noble

2022-10-05

How to write an equation where both independent variables and dependent variables are log transformed in a multiple regression?
How to write the multiple regression model when both the dependent variable and independent variables are log-transformed?
I know that without any log transformation the linear regression model would be written as enter image description here
$y={\beta }_{0}+{\beta }_{1}\left({x}_{1}\right)+{\beta }_{2}\left({x}_{2}\right)+\dots$
But now I have transformed both my dependent variables and independent variable with log. So is correct to write as enter image description here $\mathrm{log}\left(y\right)={\beta }_{0}+{\beta }_{1}\cdot \mathrm{log}\left({x}_{1}\right)+{\beta }_{2}\cdot \mathrm{log}\left({x}_{2}\right)+\dots$
Or since I am transforming both sides of question so can I write it as enter image description here
$\mathrm{ln}\left(y\right)={\beta }_{0}+{\beta }_{1}\left({x}_{1}\right)+{\beta }_{2}\left({x}_{2}\right)+\dots$

### Answer & Explanation

Reagan Tanner

I am afraid that all your transformed forms are false.
Starting from
$y={\beta }_{0}+{\beta }_{1}\left({x}_{1}\right)+{\beta }_{2}\left({x}_{2}\right)+...$
you can write :
$\mathrm{ln}\left(y\right)=\mathrm{ln}\left({\beta }_{0}+{\beta }_{1}\left({x}_{1}\right)+{\beta }_{2}\left({x}_{2}\right)+...\right)$
This is not equivalent to ${\beta }_{0}+{\beta }_{1}\left(\mathrm{ln}\left({x}_{1}\right)\right)+{\beta }_{2}\left(\mathrm{ln}\left({x}_{2}\right)\right)+...$
Also you can change of variables :
${X}_{1}={e}^{{x}_{1}}\phantom{\rule{1em}{0ex}};\phantom{\rule{1em}{0ex}}{X}_{2}={e}^{{x}_{2}}\phantom{\rule{1em}{0ex}},...$
$y={\beta }_{0}+{\beta }_{1}\mathrm{ln}\left({X}_{1}\right)+{\beta }_{2}\mathrm{ln}\left({X}_{2}\right)+...$
And with the change of :
$Y={e}^{y}$
$\mathrm{ln}\left(Y\right)={\beta }_{0}+{\beta }_{1}\mathrm{ln}\left({X}_{1}\right)+{\beta }_{2}\mathrm{ln}\left({X}_{2}\right)+...$
Sorry if I misunderstood your question.

Do you have a similar question?

Recalculate according to your conditions!