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

st: RE: Identifying Trends in Panel Data


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Identifying Trends in Panel Data
Date   Tue, 21 Jun 2005 23:32:53 +0100

For the first problem I would check out -statsby- 
with a suitable regression command. 

For the second problem, a crude approach is to set 

bysort company (year) : gen logratio = log(sales) - log(sales[1]) 

and then identify the first spell by the criterion that 
logratio is less than a specified threshold. -tsspell- seems 
possible here. 

Nick 
[email protected] 

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Jason Hwang
> Sent: 21 June 2005 21:58
> To: [email protected]
> Subject: st: Identifying Trends in Panel Data
> 
> 
> Can someone help with this problem?
> 
> I have panel data and I'm trying to identify panels with 
> particular types
> of trends. I have looked at -tsspell- but don't think it does what I'm
> trying to do.
> 
> For example, I have data 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 have millions of observations like this (thousands of 
> company-products
> with about 40 years of data for each company-product)
> 
> What I'm looking for is a sample of company-products with either a
> positive or a negative trend over time.
> 
> Most company-products look like the example above, where there is no
> obvious trend (over a longer horizon of course). But there 
> are some that
> have a statistically significant trend, either positive or 
> negative, and I
> want to isolate those for further ananalysis. Would there be 
> a way to do
> this relatively quickly?
> 
> On a related point, I want to measure the speed it takes for 
> a variable of
> interest to reach a certain threshold. For example, for a 
> company-product
> that exhibits a trend, I want to look at how many years it 
> takes for sales
> to increase by a factor of x. If anyone knows of a way to do 
> that, that
> would be very helpful.
> 
> Thank you very much for your help.
> 
> Jason
> 
> *
> *   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/
> 

*
*   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