<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Moving Average in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/87743#M38720</link>
    <description>Do you have 4 columns of results, or 4 times as many rows as you show in your sample data table?</description>
    <pubDate>Fri, 04 Jan 2019 04:35:56 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2019-01-04T04:35:56Z</dc:date>
    <item>
      <title>Moving Average</title>
      <link>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/87647#M38671</link>
      <description>&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 12:59:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/87647#M38671</guid>
      <dc:creator>jojmp</dc:creator>
      <dc:date>2019-01-03T12:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Average</title>
      <link>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/87661#M38674</link>
      <description>&lt;P&gt;hello ,&lt;/P&gt;&lt;P&gt;you can try with Formula column --&amp;gt; row --&amp;gt; moving average&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="moving.jpg" style="width: 908px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/14982i470944843464D147/image-size/large?v=v2&amp;amp;px=999" role="button" title="moving.jpg" alt="moving.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 13:45:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/87661#M38674</guid>
      <dc:creator>gianpaolo</dc:creator>
      <dc:date>2019-01-03T13:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Average</title>
      <link>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/87662#M38675</link>
      <description>&lt;P&gt;Create a new column in your data table, and apply the folloing formula&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Moving Average( :Result, weighting = 1, before = 3, :Drug )&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Jan 2019 13:56:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/87662#M38675</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-01-03T13:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Average</title>
      <link>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/87741#M38719</link>
      <description>Could you please explain the next step after this, I want to calculate the average of 4 consecutive samples</description>
      <pubDate>Fri, 04 Jan 2019 04:25:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/87741#M38719</guid>
      <dc:creator>jojmp</dc:creator>
      <dc:date>2019-01-04T04:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Average</title>
      <link>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/87743#M38720</link>
      <description>Do you have 4 columns of results, or 4 times as many rows as you show in your sample data table?</description>
      <pubDate>Fri, 04 Jan 2019 04:35:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/87743#M38720</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-01-04T04:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Average</title>
      <link>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/87744#M38721</link>
      <description>&lt;P&gt;I want to generate the moving average column as shown in the attached table, for every 4 rows I need to calculate the average&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2019 04:43:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/87744#M38721</guid>
      <dc:creator>jojmp</dc:creator>
      <dc:date>2019-01-04T04:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Average</title>
      <link>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/87746#M38722</link>
      <description>&lt;P&gt;The formula to use is&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( Mod( Row(), 4 ) == 0,
	Mean( :Result[Index( Row() - 3, Row() )] )
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I have attached your example data table, with a new column with the formula in it&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="drugs.PNG" style="width: 512px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/15001i63F40F710CA32DDB/image-size/large?v=v2&amp;amp;px=999" role="button" title="drugs.PNG" alt="drugs.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2019 04:52:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/87746#M38722</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-01-04T04:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Average</title>
      <link>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/88024#M38724</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Moving average dialog.png" style="width: 373px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/15002i2532FCBB9DB58BDE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Moving average dialog.png" alt="Moving average dialog.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I think this will give you the moving average that you want (4 rows before and 4 rows after).&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2019 11:13:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/88024#M38724</guid>
      <dc:creator>Phil_Kay</dc:creator>
      <dc:date>2019-01-04T11:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Average</title>
      <link>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/105082#M38851</link>
      <description>this did not work&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Jan 2019 09:11:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/105082#M38851</guid>
      <dc:creator>jojmp</dc:creator>
      <dc:date>2019-01-09T09:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Average</title>
      <link>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/105083#M38852</link>
      <description>what does weighting = 1, before = 3, :Drug mean?&lt;BR /&gt;Could you please explain the formula</description>
      <pubDate>Wed, 09 Jan 2019 09:12:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/105083#M38852</guid>
      <dc:creator>jojmp</dc:creator>
      <dc:date>2019-01-09T09:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Average</title>
      <link>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/105084#M38853</link>
      <description>Thanks this worked</description>
      <pubDate>Wed, 09 Jan 2019 09:13:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/105084#M38853</guid>
      <dc:creator>jojmp</dc:creator>
      <dc:date>2019-01-09T09:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Average</title>
      <link>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/532174#M75521</link>
      <description>&lt;P&gt;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):&amp;nbsp;&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/en/16.2/#page/jmp/statistical-functions-2.shtml#" target="_blank"&gt;https://www.jmp.com/support/help/en/16.2/#page/jmp/statistical-functions-2.shtml#&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PatrickGiuliano_0-1660093800183.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44691i32DEE1055F339075/image-size/large?v=v2&amp;amp;px=999" role="button" title="PatrickGiuliano_0-1660093800183.png" alt="PatrickGiuliano_0-1660093800183.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can find in Wikipedia (&lt;A href="https://en.wikipedia.org/wiki/Moving_average" target="_blank"&gt;https://en.wikipedia.org/wiki/Moving_average)&lt;/A&gt;&amp;nbsp;more on first principles and mathematical/ conceptual understanding behind the Moving Average Calculation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 01:13:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/532174#M75521</guid>
      <dc:creator>PatrickGiuliano</dc:creator>
      <dc:date>2022-08-10T01:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Average</title>
      <link>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/888637#M105090</link>
      <description>&lt;P&gt;Thanks Jim!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just used this method to calculate the difference between the maximum and minimum for the last n rows.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Hope you are doing well!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2025 02:36:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Moving-Average/m-p/888637#M105090</guid>
      <dc:creator>markschahl</dc:creator>
      <dc:date>2025-07-23T02:36:31Z</dc:date>
    </item>
  </channel>
</rss>

