1 year, 1 month ago jibParticipant
I’d like to compute an average of a data column using a sliding window with varying size of the window. For example;
The Ave2 column is the average of a sliding window of 2 values from ‘data’ – I’d like to use a slider to vary the window width. Any how, I have not been able to figure out how to do even a fixed window size sliding average.1 year ago kirktParticipant
Maybe the “Smooth” Plot Action will work – see pages 28-29 of the PDF manual. The three different techniques used in the Smooth plot action (simple moving average, weighted moving average, exponential moving average) are discussed here:
Kirk1 year ago dgteamModerator
Yes – the Smooth option in the Plot Action column will do this. (Thanks Kirk!)
@jib Here you can see the result with your data. In the table, the calculated average you sent is compared to ‘Smooth 2’ from the Plot action column. The first row is different as the logic here is that when the row number < the window, the number of averaged values will equal the row number.
FYI – Note that smoothing like like this can result in a lag on the x axis. The LOESS Fit is another type of smoothing operation that is included in the Fit command that helps to solve this problem.1 year ago jibParticipant
“Plot Action” arrgghh, how could I have missed this ! The problem I needed this smoothing/averaging for an audience who is not too familiar with this sort-a-thang. So I wanted to be able to explain it in simple terms if questions arose, the LOESS operator would go right over their head. But as luck would have it, I had to do a quick intro with this presentation and used LOESS as I wasn’t able to do it any other way.
Nobody asked questions, all impressed with the plots. Engineering/research power over financial types (devilish grin on my face).
You must be logged in to reply to this topic.