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

Re: st: RE: RE: Data manipulation question


From   Edwin Leuven <[email protected]>
To   [email protected]
Subject   Re: st: RE: RE: Data manipulation question
Date   Thu, 29 Jul 2004 10:25:38 +0200

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

edwin.
*
*   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