cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP 19 is here! See the new features at jmp.com/new.
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
Choose Language Hide Translation Bar
michaelh
Level II

Moving average in Graph Builder vs Column Formula...weird

JMP 18...I noticed that the "local width" option for the moving average in Smoother in Graph Builder had even numbers, which seemed strange, as moving average windows are typically odd for symmetry. So I did a few widths with Smoother (local region = fixed, local weighting = rectangular, local width = 2, 3, or 4) then compared to a Column moving average formula (equal weighting) with different n before/after. 

 

Surprisingly, a "local width" of 4 in Smoother is equivalent to 2 before/after in Column Moving Average, so it's like (local width) / 2 + 1 which is a super weird way to define the "width" of a moving average (it's 5!). 

Even weirder, how then does it handle an odd local widths? It just treats them like n - 1, except it does something strange at the ends of the time series. So there is no difference between local width 2 and 3, except at the ends. 

 

I can't believe this would be intentional?

 

1 REPLY 1
Byron_JMP
Staff

Re: Moving average in Graph Builder vs Column Formula...weird

So, this is the difference between the most simple method of graphically displaying data and making analytical graphs. It's like using graph builder vs. fit y by x for looking at a regression line. Graph Builder does it quick and easy, fit y by x has all the regression types and controls built in. 

 

If you're plotting moving averages I would highly recommend either using a control chart or looking into the ColMoving Average formula function.  The Col Moving Average function lets you pick the number before and or after the current row, along with weighting and controls for dealing with partial windows and excluded data as well as the ability to use a by Variable.    Graph builder is great for displaying data and exploring data. All the other tools are there for analyzing data. 

That being said, it's pretty easy to make a formula column with a moving average, and then overlay that with the data in graph builder. (easy: one click new formula column option)

 

JMP Systems Engineer, Health and Life Sciences (Pharma)

Recommended Articles