cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
jojmp
Level III

Moving Average

I have a table called drugs with columns drug and result, how do I calculate the moving average of the result column by taking the first 4 rows followed by the next 4 rows and similarly continue. Pfa the sample table for reference. 

11 REPLIES 11
jojmp
Level III

Re: Moving Average

what does weighting = 1, before = 3, :Drug mean?
Could you please explain the formula

Re: Moving Average

JMP's support documentation gives some additional background for how the formula may be defined (defines the arguments and also includes some nice little examples):  https://www.jmp.com/support/help/en/16.2/#page/jmp/statistical-functions-2.shtml#

 

PatrickGiuliano_0-1660093800183.png

 

You can find in Wikipedia (https://en.wikipedia.org/wiki/Moving_average) more on first principles and mathematical/ conceptual understanding behind the Moving Average Calculation: