Statalist


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

RE: st: Reading data with multiple (and different number of) lines per


From   Roy Wada <[email protected]>
To   <[email protected]>
Subject   RE: st: Reading data with multiple (and different number of) lines per
Date   Mon, 13 Apr 2009 11:40:46 -0700

>
> . gen long myhhid = 1 if rectype==1
> . replace myhhid = sum(myhhid)
> 
> The above is a useful trick to remember when you want to create an id 
> variable based on grouping records according to the occurance of some 
> event.
 
I should have mentioned that -merge- and -sum( )- are among the most
underrated command/functions in Stata.
 
They also happen to be Bill G.'s favorite tricks for cleaning data. It
comes up occassionally on this list, if you know what to look for.
 
Just so you know from whom I get these things from.
 
Roy
 
_________________________________________________________________
Rediscover Hotmail®: Now available on your iPhone or BlackBerry
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Mobile1_042009
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index