<?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: How to make a calculus in JMP in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-make-a-calculus-in-JMP/m-p/95643#M38771</link>
    <description>&lt;P&gt;Here is a simple example of&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5358"&gt;@Mark_Bailey&lt;/a&gt;'s&amp;nbsp;suggestion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to Here(1);

dt = New Table("Example",
	Add Rows( 5 ),
	New Column( "Time",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [0, 2, 4, 6, 8] )
	),
	New Column( "I",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values(
			[0.303858872597443, 0.22418155030798, 0.202170635461688,
			0.181779722721203, 0.148724968294765]
		)
	)
);

//use bivariate for simplicity
biv = dt &amp;lt;&amp;lt; Bivariate(
	Y( :I ),
	X( :Time ),
	Fit Polynomial( 3, {Confid Shaded Indiv( 1 ), Line Color( {212, 73, 88} )} ),
	SendToReport(
		Dispatch(
			{},
			"2",
			ScaleBox,
			{Min( 0 ), Max( 0.45 ), Inc( 0.05 ), Minor Ticks( 1 )}
		)
	)
);

//get the prediction formula string
fm = report(biv)[OutlineBox("Polynomial ?")][TextEditBox(1)] &amp;lt;&amp;lt; get text;

//get the string to the right of the equal sign and convert the string to an expression using Parse()
fm = Parse(Trim(word(2, fm, "=")));
area = Integrate(fm, Time, col minimum(:Time), col maximum(:Time));

Caption("The area under this curve is " || char(area));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&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="image.png" style="width: 234px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/15016iFE475790FD2D1C43/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 05 Jan 2019 23:35:47 GMT</pubDate>
    <dc:creator>gzmorgan0</dc:creator>
    <dc:date>2019-01-05T23:35:47Z</dc:date>
    <item>
      <title>How to make a calculus in JMP</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-a-calculus-in-JMP/m-p/94408#M38765</link>
      <description>&lt;P&gt;How to make a calculus in JMP?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;There is a two dimension of data, for instance, current and time, then in JMP Grapher, we can plot a curve and fit it smooth, for detail, please see photo below.&lt;/P&gt;&lt;P&gt;How much electric quantity will be? that means&amp;nbsp; I'd like to know how to calculate the area under the curve?&lt;/P&gt;&lt;P&gt;in mathmatic , how to make a calculus in JMP?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Jan 2019 10:06:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-a-calculus-in-JMP/m-p/94408#M38765</guid>
      <dc:creator>mujahida</dc:creator>
      <dc:date>2019-01-05T10:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a calculus in JMP</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-a-calculus-in-JMP/m-p/94893#M38767</link>
      <description>&lt;P&gt;See &lt;STRONG&gt;Help&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Scripting Index&lt;/STRONG&gt; and search for &lt;STRONG&gt;Integrate&lt;/STRONG&gt; function. This function performs numerical integration of your expression (fitted model). Use the Help button in the index to get more information about this function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Likely you will need to save the fitted model as a new column formula and then use a short script to extract the expression from the formula and use it as an argument to the Integrate() function.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Jan 2019 12:40:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-a-calculus-in-JMP/m-p/94893#M38767</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-01-05T12:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a calculus in JMP</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-a-calculus-in-JMP/m-p/95643#M38771</link>
      <description>&lt;P&gt;Here is a simple example of&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5358"&gt;@Mark_Bailey&lt;/a&gt;'s&amp;nbsp;suggestion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to Here(1);

dt = New Table("Example",
	Add Rows( 5 ),
	New Column( "Time",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [0, 2, 4, 6, 8] )
	),
	New Column( "I",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values(
			[0.303858872597443, 0.22418155030798, 0.202170635461688,
			0.181779722721203, 0.148724968294765]
		)
	)
);

//use bivariate for simplicity
biv = dt &amp;lt;&amp;lt; Bivariate(
	Y( :I ),
	X( :Time ),
	Fit Polynomial( 3, {Confid Shaded Indiv( 1 ), Line Color( {212, 73, 88} )} ),
	SendToReport(
		Dispatch(
			{},
			"2",
			ScaleBox,
			{Min( 0 ), Max( 0.45 ), Inc( 0.05 ), Minor Ticks( 1 )}
		)
	)
);

//get the prediction formula string
fm = report(biv)[OutlineBox("Polynomial ?")][TextEditBox(1)] &amp;lt;&amp;lt; get text;

//get the string to the right of the equal sign and convert the string to an expression using Parse()
fm = Parse(Trim(word(2, fm, "=")));
area = Integrate(fm, Time, col minimum(:Time), col maximum(:Time));

Caption("The area under this curve is " || char(area));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&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="image.png" style="width: 234px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/15016iFE475790FD2D1C43/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Jan 2019 23:35:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-a-calculus-in-JMP/m-p/95643#M38771</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2019-01-05T23:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a calculus in JMP</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-a-calculus-in-JMP/m-p/399036#M64983</link>
      <description>This works really great, just what I was looking for. Thank you for posting!</description>
      <pubDate>Tue, 06 Jul 2021 22:25:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-a-calculus-in-JMP/m-p/399036#M64983</guid>
      <dc:creator>thedellette</dc:creator>
      <dc:date>2021-07-06T22:25:13Z</dc:date>
    </item>
  </channel>
</rss>

