LEAD Function (CREATE command)

LEAD creates new series by copying the values of the existing series and moving them back the specified number of observations. This number is called the lead order.

  • The specification on LEAD is the name or names of the existing series and one or two lead orders, in parentheses.
  • At least one lead order must be specified; there is no default.
  • Two lead orders indicate a range. For example, 1,5 indicates lead orders one through five. A new series is created for each lead order in the range.
  • The number of new series must equal the number of existing series specified times the number of lead orders in the range.
  • The last n cases at the end of the new series, where n equals the lead order, are assigned the system-missing value.
  • Missing values in the existing series are moved back and are assigned the system-missing value in the new series.

Example

CREATE LEAD1 TO LEAD4 = LEAD(VARA,1,4).
  • Four new series are created based on leads of VARA. LEAD1 is VARA led one step, LEAD2 is VARA led two steps, LEAD3 is VARA led three steps, and LEAD4 is VARA led four steps.