Bookmark and Share

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]

st: how to aggregate data


From   fukugawa_nobuya <[email protected]>
To   [email protected]
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index