v 2 d egenms. egen function to create a moving sum. d Program by Kevin Crow/Shannon Driver, StataCorp . d d Create a new variable containing a #-period moving sum. You d may specify the number of lead() or lag() periods the moving sum d should be comprised of. f egenms/_gms.ado f egenms/egenms.hlp