Choose Language Hide Translation Bar

Moving average calculation in JMP 6

Hi There,

Is there a way for me to calculate the moving average in JMP 6?

0 Kudos

Re: Moving average calculation in JMP 6

I think you can do it using the statistical "summation" function and row functions. Here's an example for a 4-point moving average:

If(Row() < 4, Empty(), Summation(i = Row() - 3, Row(), :Column 1[i,Empty()]) / 4)

I used the "If" function to avoid errors when ( Row()-3 ) is less than 1. I'd be interested to see if someone else has a simpler way to do this.
0 Kudos
Community Trekker

Moving average calculation in JMP 6

Hi BillHallet,

I wonder if i should have a table with 1 column more that 4 row. Then run this JSL to get 4-point moving average? Then the result will be added into the following row?

Thanks a lot,Kun

0 Kudos