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

RE: st: RE: RE: Data manipulation question


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: RE: Data manipulation question
Date   Thu, 29 Jul 2004 13:08:04 +0100

Very neat indeed! 

Nick 
[email protected] 

Edwin Leuven
 
> Nick Cox wrote:
> > Here is another way to do it. 
> 
> and another:
> 
> expand ccode - cond(ccode[_n-1]==.,0,ccode[_n-1])
> bysort ccode: replace weight = 0 if _n<_N
> replace cc = _n
> 

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index