Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Detrending/Summarizing Panel Data


From   Jason Hwang <[email protected]>
To   [email protected]
Subject   st: Detrending/Summarizing Panel Data
Date   Thu, 14 Jul 2005 18:05:04 -0400 (EDT)

Hi, would someone help me with this problem?

I have millions of observations of the form:

company product year	sales
100	4	1990	312
100	4	1991	400
100	4	1992	350
100	4	1993	280
100	4	1994	302
...

I'm trying to measure the volatility of sales after taking out a
company-product-specific time trend.

If there was just one company-product, then I could regress sales on time,
then measure the volatility of the residuals. Given that I have tens of
thousands of company-pairs though, what would be the most efficient way of
doing this?

Also, I would like to ultimately generate a table showing for each
company, average sales volatility for all products sold by the company,
weighted by last period's sales volume.  This seems like something that
should be easy to do once I've detrended sales for each company-product.
I would appreciate pointers to the appropriate commands.

Thank you very much for your help.

Jason Hwang
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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