<?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: Calculating linear regression slope in formula in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/261181#M51112</link>
    <description>&lt;P&gt;Hello JMP team ...&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nelson's approach is very likely what I was looking for. I am conversing w/ him on a similar need with mann kendall tau test.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My input is not in a single row.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My data is typically contains several parameters each measured at a different time step. Tidy data format; parameters are in columns, each row is a different time state - i.e. chronology is in rows.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking into many statistical functions measuring trend in one of these or a fit versus some other X in time but&amp;nbsp;&lt;STRONG&gt;as a function of rolling windows.&amp;nbsp;&lt;/STRONG&gt;So instead of regressing the whole history of X vs Y for instance, I like a logic that looks into regression of the two within constant past N time steps. Each row then re-evaluates and gets me a new result. These could a slope from linear regression, or a tau test from a non-parametric MK test or some other stat output.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many times, we do not know when the correlation between the X's have changed, so this is one attempt to look into the impact of time for any analysis at hand. N mentioned above can be changed to various values to examine short term vs mid/long terms trends.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am ok w/ scripts, they are not my preference unless the computations can great benefit a method offered only by scripts.&lt;/P&gt;&lt;P&gt;My preference is generally to put the calculations into formulaes and have them maintained within the data frames.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Until today,&amp;nbsp;&lt;/STRONG&gt;I&amp;nbsp;&lt;STRONG&gt;did not&amp;nbsp;&lt;/STRONG&gt;know that script structures could be deployed within formulaes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;That probably was the main cause of my confusion.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate all your help.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Apr 2020 22:51:46 GMT</pubDate>
    <dc:creator>altug_bayram</dc:creator>
    <dc:date>2020-04-24T22:51:46Z</dc:date>
    <item>
      <title>Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/36411#M21394</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if there was a way to calculate the linear regression slope of column data within a data table formula.&lt;BR /&gt;&lt;BR /&gt;A simple example of the table is below. The data is ordered and I would like to calculate the slope of a fit line of volume over time using the current row's data and previous points to perform the regression.&lt;BR /&gt;&lt;BR /&gt;The idea is that I would like to see the how the calculated slope changes with increasing the number of data points. From doing this manually, the slope values end up approaching a given value and stay within +/-5% after 20 or so points.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Instance&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Time (s)&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Volume (mL)&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Slope (mL/s)&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;n/a&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;0.5&lt;/TD&gt;&lt;TD&gt;m1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;0.8&lt;/TD&gt;&lt;TD&gt;m2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;TD&gt;T&lt;/TD&gt;&lt;TD&gt;V&lt;/TD&gt;&lt;TD&gt;mN-1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;If that is possible, my next challenge would be to set this up so that I can calculate the slope formula so that it uses N data points on either side of the current row for a symmetrical moving calculation instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 18:52:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/36411#M21394</guid>
      <dc:creator>bio_grad</dc:creator>
      <dc:date>2017-02-27T18:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/36415#M21396</link>
      <description>&lt;P&gt;Here is a script that gives you the output you want, it just does it a different way.&amp;nbsp; It uses the Fit Model Platform and loops through it several time, increasing the N.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\semiconductor capability.jmp" );

// Create an output table to hold the results
dtOut = New Table( "summary",
	New Column( "Instance" ),
	New Column( "N" ),
	New Column( "RSquare" ),
	New Column( "RSM" ),
	New Column( "Intercept" ),
	New Column( "b1" ),
	New Column( "b2" )
);

Loop Counter = 0;

// Loop across the different sizes
For( i = 5, i &amp;lt;= 111, i = i + 5,
	Loop Counter++;
	
	// Create a random sample data table from the original data table
	dt &amp;lt;&amp;lt; New Column( "random", formula( Random Uniform() ) );
	dt &amp;lt;&amp;lt; sort( by( dt:random ), , Order( Ascending ), replace table( 1 ) );
	dt &amp;lt;&amp;lt; delete columns( "Random" );
	dt &amp;lt;&amp;lt; select where( Row() &amp;lt;= i );
	dtSample = dt &amp;lt;&amp;lt; subset( invisible, selected rows( 1 ), selected columns( 0 ) );
	
	// Run the regression
	fm = dtSample &amp;lt;&amp;lt; Fit Model(
		Y( :NPN1 ),
		Effects( :PNP1, :PNP2 ),
		Personality( "Standard Least Squares" ),
		Emphasis( "Minimal Report" ),
		Run(
			:NPN1 &amp;lt;&amp;lt; {Summary of Fit( 1 ), Analysis of Variance( 1 ), Parameter Estimates( 1 ),
			Lack of Fit( 0 ), Plot Actual by Predicted( 0 ), Plot Regression( 0 ),
			Plot Residual by Predicted( 0 ), Plot Effect Leverage( 0 )}
		)
	);
	
	// Capture the output data
	dtOut &amp;lt;&amp;lt; Add Rows( 1 );
	dtOut:Instance[N Rows( dtOut )] = Loop Counter;
	dtOut:N[N Rows( dtOut )] = i;
	dtOut:RSquare[N Rows( dtOut )] = (Report( fm )["Summary of Fit"][1][2] &amp;lt;&amp;lt; get)[1];
	dtOut:RSM[N Rows( dtOut )] = (Report( fm )["Summary of Fit"][1][2] &amp;lt;&amp;lt; get)[3];
	dtOut:Intercept[N Rows( dtOut )] = (Report( fm )["Parameter Estimates"][1][3] &amp;lt;&amp;lt; get)[1];
	dtOut:b1[N Rows( dtOut )] = (Report( fm )["Parameter Estimates"][1][3] &amp;lt;&amp;lt; get)[2];
	dtOut:b2[N Rows( dtOut )] = (Report( fm )["Parameter Estimates"][1][3] &amp;lt;&amp;lt; get)[3];
	
	// Clean up after our selfs
	fm &amp;lt;&amp;lt; close window;
	Close( dtSample, nosave );
	
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Feb 2017 20:15:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/36415#M21396</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-02-27T20:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/36417#M21397</link>
      <description>&lt;P&gt;Try plugging this formula into a new formula column (this will calculate the slope up to the current row):&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;(Row() * Summation( i = 1, Row(), :Time[i] * :Volume[i] )
-Summation( i = 1, Row(), :Time[i] ) * Summation( i = 1, Row(), :Volume[i] )) / (
Row() * Summation( i = 1, Row(), :Time[i] ^ 2 )
-Summation( i = 1, Row(), :Time[i] ) ^ 2)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To do the second part of your question would only require changing the index on the summation, i.e. from i=Row()-N to Row()+N.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;-Jerry&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 15:06:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/36417#M21397</guid>
      <dc:creator>jerry_cooper</dc:creator>
      <dc:date>2019-08-02T15:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/36418#M21398</link>
      <description>&lt;P&gt;You could also use a column formula. I opened&amp;nbsp;Big Class.jmp from the Sample Data folder. (Select&amp;nbsp;&lt;STRONG&gt;Help&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Sample Data Library&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Big Class.jmp&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Open&lt;/STRONG&gt;) I crated a new numeric column called &lt;STRONG&gt;moving slope&lt;/STRONG&gt;. This example computes the moving slope with a span of 3 for Y = weight and X = height&amp;nbsp;with the following column formula:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( Row() &amp;gt; 1,
	x = J( Row(), 1, 1 ) || :height[Index( 1, Row() )]`;
	y = :weight[Index( 1, Row() )]`;
	(Inv( x` * x ) * x` * y)[2];
,
	Empty()
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Then plot moving slope versus row in Graph Builder.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 21:00:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/36418#M21398</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2017-02-27T21:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/36442#M21412</link>
      <description>&lt;P&gt;This is exactly what I was looking for. I had no idea these operations were available!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 05:17:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/36442#M21412</guid>
      <dc:creator>bio_grad</dc:creator>
      <dc:date>2017-02-28T05:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/42556#M24716</link>
      <description>&lt;P&gt;wow~~&amp;nbsp; Awesome!!!!!!&lt;/P&gt;&lt;P&gt;Thank you so much!!!!! : )&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 04:52:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/42556#M24716</guid>
      <dc:creator>Steve_Kim</dc:creator>
      <dc:date>2017-07-27T04:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/50035#M28471</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to apply your formula to calculate the moving slope with a window of 8, by which I mean (for Row() &amp;gt; 7), I want to calculate the slope of the linear regression for the first set of x and y data points [1 to 8], and then the next set of 8 data points incrementing by 1 [2 to 9], and so on. I am trying to calculate the maximum slope to get the initial rate of an enzymatic reaction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please can you tell me how you would modify your script to achieve this? I have tested your formula and I obtain the slope for all data points from Row 1 to Row n, rather than a moving window of defined size.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 16:07:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/50035#M28471</guid>
      <dc:creator>Frank_Bowler</dc:creator>
      <dc:date>2018-01-23T16:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/50045#M28473</link>
      <description>&lt;P&gt;This modified formula produces a moving slope of span 8:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( Row() &amp;gt; 7,
	x = J( 8, 1, 1 ) || :height[Index( Row() - 7, Row() )]`;
	y = :weight[Index( Row() - 7, Row() )]`;
	(Inv( x` * x ) * x` * y)[2];
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Jan 2018 16:27:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/50045#M28473</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2018-01-23T16:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/50046#M28474</link>
      <description>&lt;P&gt;Excellent, that works, thank you&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 16:43:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/50046#M28474</guid>
      <dc:creator>Frank_Bowler</dc:creator>
      <dc:date>2018-01-23T16:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/72084#M35538</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Is there any plan to put slope and intercept into formula builder of a future JMP version w/ a more straight forward direct function ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;thx.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 18:36:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/72084#M35538</guid>
      <dc:creator>altug_bayram</dc:creator>
      <dc:date>2018-09-10T18:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/72106#M35544</link>
      <description>&lt;P&gt;Take a look at the Linear Regression() function, which could be used in a formula.&amp;nbsp; It might be something you can use.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 21:25:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/72106#M35544</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-09-10T21:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/108661#M39517</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You mention a "span of 3", if we want to modify it to be moving slope of "N" samples, which value will need to change?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 19:16:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/108661#M39517</guid>
      <dc:creator>rdzdec</dc:creator>
      <dc:date>2019-02-01T19:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/219817#M43986</link>
      <description>Dear &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;, can you show how to tweak the above code to run fit models on rows selections based on each 'wafer' id/value, instead of the random sampling? Thanks!</description>
      <pubDate>Fri, 02 Aug 2019 06:55:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/219817#M43986</guid>
      <dc:creator>TRR21</dc:creator>
      <dc:date>2019-08-02T06:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/255376#M50142</link>
      <description>&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5358"&gt;@Mark_Bailey&lt;/a&gt; Hi mark, I am new to JMP and am trying to do something similar to bio_grad where I perform linear regression on 3 points, then 4 points, then so on in a column in my data table. I am trying to understand what your answer is actually doing and had a couple of questions. What does || mean? also what is J?</description>
      <pubDate>Tue, 31 Mar 2020 21:47:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/255376#M50142</guid>
      <dc:creator>mksaad</dc:creator>
      <dc:date>2020-03-31T21:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/255377#M50143</link>
      <description>&lt;P&gt;J() is a function that creates a matrix of identical values.&amp;nbsp; The default is 1.&lt;/P&gt;
&lt;P&gt;|| is an operator that indicate concatenation.&amp;nbsp; So in Mark's example he is concatenating 2 matrices.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These functions and operators are fully documented in the Scripting Guide&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; Help==&amp;gt;JMP Document Library&amp;nbsp; …..&amp;nbsp; Scripting Guide&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 21:58:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/255377#M50143</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-03-31T21:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/260157#M51053</link>
      <description>&lt;P&gt;hi ...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You mentioned "&lt;SPAN&gt;Linear Regression() function, which could be used in a formula" ...and &lt;STRONG&gt;getting a slope from a formula fitting to provided data set being the final objective&lt;/STRONG&gt;, where would one go find&amp;nbsp;Linear Regression() function or any help ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Do you have any example ?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 19:17:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/260157#M51053</guid>
      <dc:creator>altug_bayram</dc:creator>
      <dc:date>2020-04-23T19:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/260166#M51059</link>
      <description>&lt;P&gt;Select Help &amp;gt; Scripting Index. Enter "regression" in the filter box. You should find the Linear Regression() function in the second list. Select it to see information about this function on the right.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 19:28:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/260166#M51059</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2020-04-23T19:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/260200#M51062</link>
      <description>I am not looking for a script.&lt;BR /&gt;I am looking for a formula application (i.e. using formula builder)</description>
      <pubDate>Thu, 23 Apr 2020 20:21:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/260200#M51062</guid>
      <dc:creator>altug_bayram</dc:creator>
      <dc:date>2020-04-23T20:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/260249#M51063</link>
      <description>&lt;P&gt;A JMP formula can pretty much be anything you want it to be.&amp;nbsp; My pointing you to the Linear Regression() function in the Scripting Index, happens to show it's example in the form of a script, but the function can also be used in a formula.&amp;nbsp; Below is a silly example, of calculating the regression for first rows 1-3, then 1-4, 1-5, etc. for all of the rows in the Big Class data table.&amp;nbsp; Here is the formula...….attached in the data table with the new formula column added&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Regression.PNG" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/23401i85F5B73332513B99/image-size/large?v=v2&amp;amp;px=999" role="button" title="Regression.PNG" alt="Regression.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 20:46:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/260249#M51063</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-04-23T20:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating linear regression slope in formula</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/260265#M51064</link>
      <description>&lt;P&gt;Can you give us some more background on what you're looking for?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Formulas, generally speaking, work across rows of a data table, evaluating one per row with column values from that row as inputs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, by asking for a regression function in the formula editor, one would expect that you had a matrix of input values in each row of your data table. Perhaps that's what you've got but that's an unusual structure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, with some more information we may be able to help you understand how you could use a formula for this, or perhaps, point you in a direction outside of the formula editor.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 21:14:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-linear-regression-slope-in-formula/m-p/260265#M51064</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2020-04-23T21:14:59Z</dc:date>
    </item>
  </channel>
</rss>

