Here is (a slightly edited) part of an e-mail prepared by Prof. Carriquiry instructing her class how to get
JMP to compute moving averages:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
How to compute a MA with a window as large as (say) 50 with JMP without going crazy trying to type the
formula in by hand? A handy approach is to do the following computation if you wish to compute a MA of
size 50:
* To get the first average corresponding to time period 50, you want to take the average of the y's during
the first 50 time periods (i.e., y_1 through y_50).
* To get the second average corresponding to time period 51 you want the average of the y's in time
periods 2 to 51.
* And so on.
Here is how you operationalize this in JMP:
* In Data Table, add a new column. Call it, for example, MA50.
* Define the elements in the column as Formula
* From Functions, choose Statistical and then Summation
* In subscript (where it reads i = 1) you delete the 1 and insert Row - 50 + 1. To get the Row, what you do
is go to Functions, choose Row, and within Row choose Row again. Row represents the current row, so
that when JMP is getting the MA50 for time period 78, Row takes on the value 78.
* Now go to the superscript where it reads NRow( ). You want to delete the NRow( ) and instead insert
just Row. Find Row just as you did for the subscript.
* Now click on body and insert the name of the variable (column) for which you wish to make MA's
* Go again to Functions and Row and choose Subscript. In the Subscript box type the letter i.
* Finally, hit the divide symbol in the middle and divide the entire expression into 50, to get the average.
* Do Apply.
JMP will give you an error because it will not be able to compute the MA50 for the first 49 observations.
Just hit Ignore Errors and it will give you the MA50 for time periods 50 and larger.