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

Re: st: RE: speeding up program


From   Patricia Sourdin <patricia.sourdin@adelaide.edu.au>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: speeding up program
Date   Wed, 27 Oct 2004 11:50:00 +0930

Wow, thanks Scott, that did it!!  I love Stata!

Quoting Scott Merryman <smerryman@kc.rr.com>:

> > -----Original Message-----
> > From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> > statalist@hsphsun2.harvard.edu] On Behalf Of Patricia Sourdin
> > Sent: Tuesday, October 26, 2004 7:27 PM
> > To: 'statalist@hsphsun2.harvard.edu'
> > Subject: st: speeding up program
> > 
> <snip> 
> > 
> > In other words, I have monthly salary data on each individual (memid) in
> > each
> > household(hhid). My data set has about 60,000 observations.
> > I have written the following command to sum salary across month for each
> > individual
> > 
> > by hhid memid,sort: egen quart_inc=sum(salary)
> > 
> > which works fine except then I have to get rid of all the duplicate totals
> > created for each individual.  
> <snip>
> 
> Patricia,
> 
> How about -collapse (sum) salary, by(hhid memid)-
> 
> Hope this helps,
> Scott
> 
> 
> 
> *
> *   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index