Subscribe Bookmark RSS Feed

Moving average calculation in JMP 6

Hi There,

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

Thanks,
2 REPLIES
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.
leanpharma_gmai

Community Trekker

Joined:

Oct 28, 2011

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