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 on April 23, and its replacement, is already up and running.

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

st: moving average.. conditioning on a date

From   "Marco Francesco" <>
Subject   st: moving average.. conditioning on a date
Date   Sun, 04 Nov 2012 21:58:09 +0100

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:

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