Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Calculate moving average

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Mar 4, 2019 2:03 PM
(2343 views)

I have a table which has 720 columns of data (plus other columns) and want to create 715 additional columns that have the moving average of the data. So columns R001,R002,R003,R004,R005 would be averaged to yeild T001 nfor each row in the table. Then R002,R003,R004,R005,R006 average would yield T002 etc... I then have a script to graph any selected row by the T data points. Anjy how I can create a script that I can add to a data table to do this manipulation?

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Replace the Lag() function with the Col Moving Average() function and you will get what you want

Jim

4 REPLIES 4

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Calculate moving average

It seems as if your data are 90 degrees rotated from what they should be. How many rows of data do you have when you have the 720 columns?

If you transpose your data, doing what you want will be a simple task, as will the graphing of the results.

Jim

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Calculate moving average

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Replace the Lag() function with the Col Moving Average() function and you will get what you want

Jim

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Calculate moving average

Thank you that worked.