Pages

Friday, January 21, 2011

Amazing Logarithm

Log-linearizing is a most common way to deal with data in economic study, perhaps in any data analysis. In my first macroeconomic and econometric class this semester, I encountered this widely used way of data transformation.
Common Reasons for taking log of the data:
1. Primary reason is to smooth the data, so as to show the patterns.
In real life, the data we collected, especially large sample of data from a big pool, have huge difference of their magnitudes.  Once we take log of the data, without changing the properties of the data, it helps us to spread the points more uniformly in the graph.

Let me illustrate with a simple sample of world per capita GDP, which exists big gap between different years. As we can see from the following two graphs, the data spreads more smoothly in the second graph. Without taking the log of the GDP, graph 1 clearly ignores the changes between 1000 and 1800.

 Figure 1: World per Capita GDP


Figure 2: Log of World per Capita GDP


2.Good properties



Divided by 10
Original Data
Multiplied by 10
Data
0.1*A
   A
10A
Log of Data
LogA-1
 LogA
LogA+1



Divided by 10
Original Data
Multiplied by 10
Change of Data
0.1
   1
10
Change of Log Data
-1
 0
1



Above tables show again the effect of smoothing data when you take log of the data. 

"The most important feature of the logarithm, which makes it so useful in analyzing data, is that, relatively, it moves big values closer together while it moves small values farther apart. This is seen in the picture to the left, where the original values are on the upper scale and their common logarithms are on the lower scale. In the log scale, small values that were close in the original scale (say, 1 and 10) are now the same distance apart as large values that were farther apart in the original scale (say, 10 and 100). " Source: http://www.jerrydallal.com/LHSP/logs.htm
(Thanks to Gerard E. Dallal)

Concluded from Gerard E. Dallal's Study, a logarithmic transformation will help us to make the original data with more appealing properties, such as symmetric, homoscedasticity and linearity. In one word, logarithm makes life simpler and easier.


3. Doesn't necessarily need to be linear. But performs very well for growth rate ( any functions with exponential or power ). For example, Cobb-douglas production function. Yt=(1+g)t*(1+)t*yt. After log transformation, you can easily see the linear relationship between log Y and time.


Some visual impression of logarithms:
-Logarithm in real life:
Logarithmic spiral


-----------------------------------------------
Hope I can understand logarithm and data transformation deeper in the end of this semester.
Stay tuned.

No comments:

Post a Comment