Statalist


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

Re: st: using _all


From   "Ashim Kapoor" <[email protected]>
To   [email protected]
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 <[email protected]> wrote:
> 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/
>
*
*   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