Leads, Lags and Differences by using Stata
Time series analysis often involves lagged variables, or values from previous times. Lags can be specified by explicit subscripting. For example, the following command creates variable mei l, equal to the previous month’s Multivariate ENSO Index (mei) value: . generate mei_1 = mei[_n-1] Alternatively, we could accomplish the same thing, using tsset data, with