The varsoc command computes these statistics over a range of lags p while maintaining a common sample and option specification. varsoc can be used as a preestimation or a postestimation command. When it is used as a preestimation command, a depvarlist is required, and the default maximum lag is 4.