Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: moving average.. conditioning on a date


From   Steve Samuels <sjsamuels@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: moving average.. conditioning on a date
Date   Sun, 4 Nov 2012 17:35:11 -0500

Sorry for the typo: The command is -movavg-. If you download it and read
the -help-, you will see that it does not require balanced panels.


Steve

On Nov 4, 2012, at 5:24 PM, Francesco wrote:

Well, Thank you for your kind suggestion (I already checked tssmooth
and egen filter) but I cannot find what I am looking for (in
particular for the running sum)
As the panel is unbalanced, I think I cannot use the L. operator ...
this is the main difficulty I guess
Maybe you have a suggestion?

Many thanks

On 4 November 2012 22:51, Steve Samuels <sjsamuels@gmail.com> wrote:
> 
> The Statalist archives are not a good place to look for
> commands. Try -findit- first.  "findit moving average" would
> have turned up -movag- at SSC. If -findit- had not been successful.
> then a second  step would have been to Google "Stata moving average".
> 
> 
> Steve
> 
> 
> On Nov 4, 2012, at 3:58 PM, Marco Francesco wrote:
> 
> Dear all,
> 
> I looked into the archives, and still I am not sure how to proceed :
> 
> I have a panel dataset (id - day) and I would like to obtain a variable X that keeps the running sum (or the average) of variable Y's observations that occur in a given moving time window : that is between today's observation date and (today's observation date - X) where X is fixed.
> 
> Do you know how to proceed ?
> 
> Many thanks
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index