<p>In excel use the LN function to perform the log.  The difference in logs should be done with the log of the most recent value minus the log of the past value</p>
<p>LN(Present) -LN(PAST) = Growth%</p>
<p><a href="https://i.sstatic.net/eJ19m.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/eJ19m.png" alt="enter image description here" /></a></p>
<p>Take the excel handle and pull it down so that you can copy fill the formula to do all the
quarterly periods.</p>
<p><a href="https://i.sstatic.net/1xgAs.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/1xgAs.png" alt="enter image description here" /></a></p>
<p>At this point you may also want to chose which decimal place you want to set your value to make the data look presentable by using the decrease/increase decimal value in the number section of the home tab within the menu bar.</p>
<p><a href="https://i.sstatic.net/yJyMU.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/yJyMU.png" alt="enter image description here" /></a></p>
<p>I am not sure about your last statement about negative values.  If you mean that what to do when you get a negative value after the log transformation then that value is normal and be part of your regression analysis because you are seeing a decrease in change over time.</p>
<p>However, if the numeric value that you are log transforming is a negative value (<em>which should not show up in the aggregate Real GDP values time series</em>)  then you should pick a method to adjust the value before you use the log.</p>
<p>There are some sites that does offer suggested options ( <a href="https://blogs.sas.com/content/iml/2011/04/27/log-transformations-how-to-handle-negative-data-values.html" rel="nofollow noreferrer">https://blogs.sas.com/content/iml/2011/04/27/log-transformations-how-to-handle-negative-data-values.html</a>  ) ; however, just like in data science, pick a method and stick to it and report what you did.</p>

CC BY-SA 4.0
2020-03-28T01:50:44.020Z
2020-03-28T01:50:44.020Z
2020-06-17T09:40:54.643Z
Mike J
<p>I’m trying to run a regression with GDP quarterly growth as the dependent variable. I’ve been asked to find the log diff of the data values however I’m unsure on how to do this on excel and how to deal with negative values</p>

<macroeconomics><statistics>
How do deal with negative values when finding log difference?
StressedStudent98
# How do deal with negative values when finding log difference?

(Asked by: username_0 on 2020-03-25)

I’m trying to run a regression with GDP quarterly growth as the dependent variable. I’ve been asked to find the log diff of the data values however I’m unsure on how to do this on excel and how to deal with negative values

**Tags:** macroeconomics, statistics

---

## 1 answers

### Answer by username_1 on 2020-03-28. Score: 1

In excel use the LN function to perform the log. The difference in logs should be done with the log of the most recent value minus the log of the past value

LN(Present) -LN(PAST) = Growth%

[![enter image description here](https://i.sstatic.net/eJ19m.png)](https://i.sstatic.net/eJ19m.png)

Take the excel handle and pull it down so that you can copy fill the formula to do all the
quarterly periods.

[![enter image description here](https://i.sstatic.net/1xgAs.png)](https://i.sstatic.net/1xgAs.png)

At this point you may also want to chose which decimal place you want to set your value to make the data look presentable by using the decrease/increase decimal value in the number section of the home tab within the menu bar.

[![enter image description here](https://i.sstatic.net/yJyMU.png)](https://i.sstatic.net/yJyMU.png)

I am not sure about your last statement about negative values. If you mean that what to do when you get a negative value after the log transformation then that value is normal and be part of your regression analysis because you are seeing a decrease in change over time.

However, if the numeric value that you are log transforming is a negative value (*which should not show up in the aggregate Real GDP values time series*) then you should pick a method to adjust the value before you use the log.

There are some sites that does offer suggested options ( <https://blogs.sas.com/content/iml/2011/04/27/log-transformations-how-to-handle-negative-data-values.html> ) ; however, just like in data science, pick a method and stick to it and report what you did.


---

