Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: re: calculating growth rates in a panel dataset


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: re: calculating growth rates in a panel dataset
Date   Mon, 13 Oct 2008 09:26:19 -0400

< >
Austin said:

I think you mean D.log(sales) instead of log(D.sales) but that cannot
be done in one command as shown--one must generate logsales and then
calculate the difference.  In any case, the difference in logs is only
sometimes a good approximation for percent change, so I would stick
with the first syntax:

webuse grunfeld, clear
g not=log(d.kstock)
g lnk=log(kstock)
g dlnk=d.lnk
g pc=d.kstock/l.kstock
li com t kstock not-pc in 1/10



Absolutely right. The log approx does require calculation of log(sales) first, and the notion that log(1 + x) ~ x is only appropriate for small x. It would not be a good approximation if used for daily values of the S&P 500 index from the last couple of weeks, for instance!

Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index