Statalist


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

Re: st: using _all


From   "Ashim Kapoor" <ashimkapoor@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: using _all
Date   Thu, 28 Aug 2008 14:35:47 +0530

Thank you.

On Thu, Aug 28, 2008 at 2:33 PM, Eva Poen <eva.poen@gmail.com> wrote:
> 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/
>
*
*   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