# In regression analysis what does taking the log of a variable do?

I keep seeing this in class and I don't understand why we add the log in there from time to time. For example we have regression model 1: $$1:\hat Y=-14.37+.321X_1+.043X_2-.0051X_3+.0035X_4$$ and then it says that we reestimate the model using the log form of $X_3$ and $X_4$ to get model 2: $$2:\hat Y=-36.30+.327X_1+.069X_2-4.74\log(X_3)+7.24\log(X_4)$$ what does the $\log$ do? In terms of affecting the regression and in terms of affecting the variables.

• Sometimes people use log to bring a skewed variable to be more normal. Some inferences depend on the assumption of normal distribution. – JACKY Li Oct 21 '12 at 18:35
• @Patrick so you're saying the log will "normalize" a variable? – Kyle Oct 21 '12 at 21:11
• It changes the dependence of $\hat Y$ on $X_3,X_4$. That may be a better reflection of reality. You can also try $X_3^2$, $\exp(X_4)$ or whatever makes a decent fit to your data. – Ross Millikan Oct 21 '12 at 22:15
• @PatrickLi there is no need for the x-variables to be normal – Glen_b Oct 21 '12 at 23:55

Substantively, sometimes the meaning of a change in a variable is more multiplicative than additive. For example, income. If you make \$20,000 a year, a \$5,000 raise is huge. If you make \$200,000 a year, it is small. Taking logs reflects this: log(20,000) = 9.90 log(25,000) = 10.12 log(200,000) = 12.20 log(205,000) = 12.23  The gaps are then 0.22 and 0.03. In terms of interpretation, you are now saying that each change of 1 unit on the log scale has the same effect on the DV, rather than each change of 1 unit on the raw scale. • @Kyle Clarification: The effects of removing skew and turning multiplicative relationships to additive ones only apply when you take logs of the dependent variable - neither effect applies to the specific details of your question, which had logs only on independent variables. However, it's important to know about those effects. – Glen_b Oct 22 '12 at 21:42 Taking logs will make certain forms of relationship that look curved look linear or more nearly linear. Think of introducing new variables,$X_5 = \log(X_3)$and$X_6 = \log(X_4)$and then your model is linear in$X_1, X_2, X_5$and$X_6\$.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}