# cumulative max (analogous to cumulative sum) ?

5 messages
Open this post in threaded view
|

## cumulative max (analogous to cumulative sum) ?

 Hello everyone –   I’m trying to figure out when time series signals have hit what skin conductance researchers call “recovery half time”. After a peak in skin conductance activity, half recovery occurs when the signal falls back down halfway toward its baseline level. You can see an example here: https://images.app.goo.gl/PVME8Lxhtw2rXCnw5   I’m dealing with thousands of these signals, so it needs to be automated. It wouldn’t be too difficult if the suite of time series functions included a “cumulative max” function (i.e., the maximum value to this point in the time series), but there is no such function.   I thought I had a workaround involving the cumulative sum (CSUM) function. At each time point, I calculated the cumulative sum of all rises (RiseCsum) and all declines (FallCsum) . I then divided RiseCsum by FallCsum with the idea that half recovery time occurred when that fraction exceeded .5. This works with simple, canonical responses, but falls apart when the signal gets choppy.   That said, if anyone knows of any way to calculate cumulative max, I’d greatly appreciate hearing about it.   (Note: If nothing comes up, my next step will be to turn to the SHIFT VALUES function to get all of the subsequent values in each time series. I’m not entirely sure how it will work, but I suspect that I’ll be able to manage from there. The problem is that these time series can go on for up to 1000 time points, so that would mean 1000 new variables. Not fun. If someone knows how to get the cumulative max, I’d be in a much better position.)   Thanks in advance.   -- Jeff     ********************** Jeff T. Larsen, Ph.D. Professor of Psychology University of Tennessee, Knoxville [hidden email]  /    865-974-9967   ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Open this post in threaded view
|

## Re: cumulative max (analogous to cumulative sum) ?

Open this post in threaded view
|