<?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: Regression P-Values in a Column based on the Values from other Columns in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Regression-P-Values-in-a-Column-based-on-the-Values-from-other/m-p/404389#M65477</link>
    <description>&lt;P&gt;Adding to&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;, there was an earlier discussion about setting up a column formula to compute a moving slope. I suggest that you find it and read it for useful background. The basis for that solution is the function that Jim suggested here. You could expand the formula to result in a row state change that is then used by the control chart to identify where the signal of a change might have occurred.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are many built-in features that can be used to implement this idea, and they do not all require a script.&lt;/P&gt;</description>
    <pubDate>Tue, 27 Jul 2021 18:47:01 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2021-07-27T18:47:01Z</dc:date>
    <item>
      <title>Regression P-Values in a Column based on the Values from other Columns</title>
      <link>https://community.jmp.com/t5/Discussions/Regression-P-Values-in-a-Column-based-on-the-Values-from-other/m-p/404357#M65471</link>
      <description>&lt;P&gt;Hi... I am trying to find an alternative to Nelson Rule number 3 (6 points increasing or decreasing) that uses a regression based on a number of&amp;nbsp; successive points an alpha value and a resultant p-value to help me flag when a signal is large enough to overcome noise. This is would be used for tool wear types of control charts.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suppose I had a data set that looks like below (for simplicity) where;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;X is my independent variable and Y is the dependent. I would like to calculate the P-value of the regression of&amp;nbsp; successive points (N=3 in the example below) to help me understand when there is a signal large enough to overcome the noise in regression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Obviously, the p-values are in the table below to be exemplary&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I recognize that N will likely need to be larger (although, of course it depends on the size of signal) .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I create a script that will do this so that I can play with N and alpha to help me understand when regression is different than the null? I don't really care about the annotation on the control chart if I can have the p-value in the table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;P-Value&lt;/TD&gt;&lt;TD&gt;Slope&lt;/TD&gt;&lt;TD&gt;SubGroup Size&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;0.05&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&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2023 23:34:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Regression-P-Values-in-a-Column-based-on-the-Values-from-other/m-p/404357#M65471</guid>
      <dc:creator>fat_angus</dc:creator>
      <dc:date>2023-06-10T23:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Regression P-Values in a Column based on the Values from other Columns</title>
      <link>https://community.jmp.com/t5/Discussions/Regression-P-Values-in-a-Column-based-on-the-Values-from-other/m-p/404382#M65476</link>
      <description>&lt;P&gt;It would be a simple matter to loop through a data table, and build&amp;nbsp; one's x and y matrices and then perform a regression, using the Linear Regression() function.&amp;nbsp; The decision of what values to place in the 2 matrices would be the item to vary.&lt;/P&gt;
&lt;P&gt;Here is the example taken from the Scripting Index, for the Linear Regression() function&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
/*Simple Linear Regression: y = intercept + beta * x + error*/
y = [3, 5, 7, 5];
X = [1, 2, 3, 4];
{Estimates, Std_Error, Diagnostics} =
Linear Regression( y, X, &amp;lt;&amp;lt;printToLog ); 
/*
t_ratio = Diagnostics["t_ratio"]; 
p_value = Diagnostics["p_value"]; 
RSquare = Diagnostics["RSquare"]; 
RSquare Adj = Diagnostics["RSquare Adj"];
*/&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Jul 2021 18:41:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Regression-P-Values-in-a-Column-based-on-the-Values-from-other/m-p/404382#M65476</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-07-27T18:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Regression P-Values in a Column based on the Values from other Columns</title>
      <link>https://community.jmp.com/t5/Discussions/Regression-P-Values-in-a-Column-based-on-the-Values-from-other/m-p/404389#M65477</link>
      <description>&lt;P&gt;Adding to&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;, there was an earlier discussion about setting up a column formula to compute a moving slope. I suggest that you find it and read it for useful background. The basis for that solution is the function that Jim suggested here. You could expand the formula to result in a row state change that is then used by the control chart to identify where the signal of a change might have occurred.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are many built-in features that can be used to implement this idea, and they do not all require a script.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 18:47:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Regression-P-Values-in-a-Column-based-on-the-Values-from-other/m-p/404389#M65477</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2021-07-27T18:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Regression P-Values in a Column based on the Values from other Columns</title>
      <link>https://community.jmp.com/t5/Discussions/Regression-P-Values-in-a-Column-based-on-the-Values-from-other/m-p/404414#M65482</link>
      <description>&lt;P&gt;I am interested in the built in functions to create these&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;&amp;nbsp;new rows as I would prefer not to use a script. I did look up your solution to Moving Slope (copied below) but the solution is way over my head. I am too old (And too stupid) and can no longer do this kind of matrix math where you are multiplying by&amp;nbsp; transposed matrices and then taking inverses... honestly, I can't follow this. Thus, why I would find a script more useful as they tend to be more linear. :)&lt;/img&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;But thanks.&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( Row() &amp;gt; 2,
	x = J( Row(), 1, 1 ) || :MX[Index( 1, Row() )]`;
	y = :MY[Index( 1, Row() )]`;
	(Inv( x` * x ) * x` * y)[2];
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 20:16:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Regression-P-Values-in-a-Column-based-on-the-Values-from-other/m-p/404414#M65482</guid>
      <dc:creator>fat_angus</dc:creator>
      <dc:date>2021-07-27T20:16:50Z</dc:date>
    </item>
  </channel>
</rss>

