Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: how to aggregate data


From   fukugawa_nobuya <nfukugawa@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: how to aggregate data
Date   Wed, 02 Nov 2011 17:17:32 +0900

dear statalisters,
i would like to know how to compress the original data as follows.

---original data---

firm	year	age
a       1999	19
a	1999	25
b	1998	65
c	2010	56
c	2010	58
c	2010	54

---aggregated data---
firm	year	age
a       1999	22
b	1998	65
c	2010	56

please note the number of rows will be reduced.

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index