Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: using _all


From   "Ashim Kapoor" <[email protected]>
To   [email protected]
Subject   st: using _all
Date   Thu, 28 Aug 2008 14:30:08 +0530

Hello everyone,

I wish to replace the last obs of EACH variable by the previous value.
But when I do this : -
. foreach x in _all {
   replace  `x'=`x'[_n-1] if _n==_N
  }

it does'nt work.!

Any tips guys ?

Thank you,
Ashim.
*
*   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