Statalist


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

Re: st: using _all


From   "Eva Poen" <eva.poen@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: using _all
Date   Thu, 28 Aug 2008 10:03:57 +0100

Ashim,

you want to change the first line:

foreach x of varlist _all {

Hope this helps,
Eva

2008/8/28 Ashim Kapoor <ashimkapoor@gmail.com>:
> 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index