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