Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: tscollap - converting monthly data to annual averages
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: tscollap - converting monthly data to annual averages
Date
Fri, 27 Jul 2012 12:10:36 +0100
Presumably you should add your firm identifier variable to the -by()-
option of -collapse-.
Nick
On 27 Jul 2012, at 07:43, David Ashcraft <[email protected]>
wrote:
Nick: I got my mistake. I have the following code for collapse now:
gen dm = yofd(date2)
format dm %ty
collapse rp rm, by(dm)
It has collapsed the data. However, as mentioned previously, It
should collapse by year and by firm. At the moment, it is collapse
only by year
*
* 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/