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

st: Re: tscollap query


From   Kit Baum <[email protected]>
To   Restrepo J <[email protected]>
Subject   st: Re: tscollap query
Date   Mon, 26 Jan 2004 12:41:57 -0500

Dear Jorge

tscollap is just a convenience, "hard wiring" various features of -collapse- to take advantage of what we know about calendar-time data. Since -collapse- can generate arbitrary subsets of a dataset, where you specify exactly how the data are to be collapsed, I should think that you can use -collapse- to deal with your event-oriented data. I'm not sure how, though, you plan to "aggregate the variables on each event according to different time

periodicity (days, weeks, months, quarter, years) and/or by spatial
clusters
(both defined by the user and statistically generated)". It seems to me that an observation in the result data
would either be identified by a time period, or by an event, but could not very well be associated with both; and how would you deal with a result dataset in which the observations either belong to a time period or to a specific event?

Best wishes
Kit

On Jan 26, 2004, at 12:24 PM, Restrepo J wrote:


Dear Professor Baum:

I am taking the liberty of writing you regarding the program you wrote in
Stata for collapsing time series. Nick Cox pointed to it in statalist after
my query in Statalist:


I am working with a relatively large data set organised by events (19.000
in
total). Each event has time and spatial descriptors and several variables.

My query is: Is there a command-routine-program for Stata to
aggregate the variables on each event according to different time
periodicity (days, weeks, months, quarter, years) and/or by spatial
clusters
(both defined by the user and statistically generated)? I would appreciate
any kind of guidance on this question.
It seems that your program in combination with the command Collapse would
allow me to do most of what I need, as I would be able to aggregate from
monthly to lower frequencies. The problem is that I have my original data in
"event" form, i.e. a collection of daily events that I would need also to
collapse to daily and monthly frequencies. Do you know of a way of doing
this? Is it possible to do this with your programme or with a variation of
it?

Best regards,


Jorge Alberto Restrepo
____________________________
Department of Economics
Royal Holloway-University of London
Egham Hill, Egham, Surrey
TW20 0EX, United Kingdom
*
*   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