How to build a cumulative sum (cusum) syntax in SPSS?

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

AMCuser
Posts: 1
Joined: Thu May 05, 2016 9:47 pm

How to build a cumulative sum (cusum) syntax in SPSS?

Postby AMCuser » Thu May 05, 2016 9:48 pm

I'm trying to build a cumulative sum syntax based on the following formula:

X(t) = max(0, X(t-1) + W(t))

X0 = 0 t= 1,2,3,... W(t) = given by another variable (not relevant here)

The aim is to plot it into a graph. Can anyone help my convert this formula into a syntax function?

Who is online

Users browsing this forum: No registered users and 1 guest

cron