Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

RE: st: RE: mean and sd of lagged variables

From   Nick Cox <>
To   "''" <>
Subject   RE: st: RE: mean and sd of lagged variables
Date   Fri, 29 Jul 2011 15:15:23 +0100

See also -mvsumm- (SSC). 

I don't have specific recall of a posting from that far back on -ma-. It sounds an unlikely name as -ma- is a legal abbreviation for -macro-.  


Ben Hoen

The " sample ado" to which I was referring was from the .help rolling:

webuse lutkepohl2, clear
tsset qtr
rolling mean=r(mean) median=r(p50), window(10): summarize inc, detail
list in 1/10

This cleared all of the variables from the working file and replaced them
with: start end mean median

I don't want to loose the variables in the working file, therefore was
thinking there would be a way to calculate the mean and sd using a command
not unlike .gen or .egen.

Somewhat tangentially, way back in early 2000s you wrote about a .ma
command.  Is that not working anymore?  (the mean I calculated above IS a
moving average.)

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index