CSUM Function (CREATE command)

CSUM produces new series based on the cumulative sums of the existing series. Cumulative sums are the inverse of first-order differencing.

  • The only specification on CSUM is the name or names of the existing series in parentheses.
  • Cases with missing values in the existing series are not used to compute values for the new series. The values of these cases are system-missing in the new series.

Example

CREATE NEWVAR1 NEWVAR2 = CSUM(TICKETS RNDTRP).
  • This example produces a new series called NEWVAR1, which is the cumulative sum of the series TICKETS, and a new series called NEWVAR2, which is the cumulative sum of the series RNDTRP.