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]

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

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

Got you. I wouldn't call that a post; it's an FAQ. Also, it explains why it is no longer good advice. 

-egen, ma()- is official and still exists but went undocumented around about Stata 9 in a big clean-up of -egen-. 

It predates -tsset- and is guaranteed to be completely stupid about panel data, so was quietly hidden given other ways to get moving averages. 

It still works in the sense that anybody's .do or .ado files using it will still work as they did, but it is not a competitor with other ways of getting moving averages. 


Ben Hoen

The post I was referring to was about egen, ma()

And, more importantly, -mvsumm- is exactly what I wanted.  Thanks to you and
Chris for writing it.  Life just got much easier.

Nick Cox 

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-.  

*   For searches and help try:

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