Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: how to generate mean for a secquence of five year of a variable
From
prakash singh <[email protected]>
To
[email protected]
Subject
Re: st: how to generate mean for a secquence of five year of a variable
Date
Fri, 6 May 2011 23:35:37 +0530
thank a lot every one.
Prakash
On Fri, May 6, 2011 at 5:31 PM, Scott Merryman <[email protected]> wrote:
> How about something like this:
>
> webuse grunfeld,clear
> tssmooth ma mean = invest, w(4,1,0)
> replace mean = . if mod(_n,5) !=0
> l, sepby(com)
>
> Scott
>
>
> On Fri, May 6, 2011 at 6:11 AM, Nick Cox <[email protected]> wrote:
>> Have you thought about ignoring what you don't want or replacing it with missing?
>>
>> Nick
>> [email protected]
>>
>> prakash singh
>>
>> Thanks Nick,
>> Your suggestion did work but it is giving me five observation in place
>> of one only.
>> i.e. it is filling first four observation point with the mean value in
>> stead of giving only one observation for var2 at cell number 5.
>>
>> On 5/5/11, Nick Cox <[email protected]> wrote:
> *
> * 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/