Ashim,
you want to change the first line:
foreach x of varlist _all {
Hope this helps,
Eva
2008/8/28 Ashim Kapoor <[email protected]>:
> 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/