<?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: Extracting parameter estimates from nonlinear (sigmoidal) curve fit - scripting in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Extracting-parameter-estimates-from-nonlinear-sigmoidal-curve/m-p/69253#M35038</link>
    <description>&lt;P&gt;Use&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;jrn["Correlation of Estimates"][MatrixBox(1)] &amp;lt;&amp;lt; Make Combined Data Table;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Go to Main Menu&amp;gt; Help &amp;gt;Books &amp;gt; JMP Scripting Guide then open the PDF and scroll to Chapter 11, Display Trees.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A JMP report is a list of nested display boxes.&amp;nbsp; This will show you how to find objects and send messages.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;jrn &amp;lt;&amp;lt; show tree structure;

//or right click on a reveal button to the left of an outline box
// then select Edit, Show Tree Structure&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Aug 2018 23:21:06 GMT</pubDate>
    <dc:creator>gzmorgan0</dc:creator>
    <dc:date>2018-08-22T23:21:06Z</dc:date>
    <item>
      <title>Extracting parameter estimates from nonlinear (sigmoidal) curve fit - scripting</title>
      <link>https://community.jmp.com/t5/Discussions/Extracting-parameter-estimates-from-nonlinear-sigmoidal-curve/m-p/69099#M35001</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To quickly orient you:&amp;nbsp;I am working with ELISA data (dose-response curve) so my independent variable is dilution factor, my dependent variable is absorbance, and I have multiple time points I am looking at for multiple animals. I'd like to be able to find the EC50 - dilution at half maximal response - with a nonlinear, sigmoidal, curve fit. I am currently using a&amp;nbsp;&amp;nbsp;4 parameter model (Probit 4P).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, I'd like to write a script that can get the data from the parameter estimates into a table, find the midway point between the upper and lower asymptotes for each curve, and then use that value in a custom inverse prediction to get the EC50. I'm pretty sure I can do the second two parts if I could just get the dang parameter estimates!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's what I have for the curve fitting:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For ( i = 1, i &amp;lt;= N items (Mice), i++, 
		FC = Fit Curve (
		Y ( :Data ), 
		X (:Dilution ), 
		Group (:Timepoint),
		By(:Animal)
		
		Fit Probit 4P, 
		Where (:Animal == eval(Mouse_names[i])), //thist isn't referencing the variable the way i expect but using either eval( ) or char( ) seems to be a work-around?...
	SendToReport(
		Dispatch(
			{"Plot"},
			"7",
			ScaleBox,
			{Format( "Fixed Dec", 12, 0 ), Min( 0 ), Max( 4 ), Inc( 2 ),
			Minor Ticks( 0 )}
		),
		Dispatch(
			{"Plot"},
			"6",
			ScaleBox,
			{Scale( "Log" ), Format( "Scientific", 12 ), Min( 0.0000001 ),
			Max( 0.1 ), Inc( 2 ), Minor Ticks( 0 )}
		),
		Dispatch(
			{"Plot"},
			"13",
			ScaleBox,
			{Format( "Fixed Dec", 12, 0 ), Min( 0 ), Max( 4 ), Inc( 2 ),
			Minor Ticks( 0 )}
		),
		Dispatch(
			{"Plot"},
			"16",
			ScaleBox,
			{Scale( "Log" ), Format( "Scientific", 12 ), Min( 0.0000001 ),
			Max( 0.1 ), Inc( 2 ), Minor Ticks( 0 )}
		),
		Dispatch(
			{"Probit 4P", "Plot"},
			"7",
			ScaleBox,
			{Format( "Fixed Dec", Use thousands separator( 1 ), 12, 0 ), Min( 0 ),
			Max( 4 ), Inc( 2 ), Minor Ticks( 0 )}
		),
		Dispatch(
			{"Probit 4P", "Plot"},
			"6",
			ScaleBox,
			{Scale( "Log" ), Format( "Scientific", 12 ), Min( 0.0000001 ),
			Max( 0.1 ), Inc( 2 ), Minor Ticks( 0 )}
		),
		Dispatch(
			{"Probit 4P", "Plot"},
			"13",
			ScaleBox,
			{Format( "Fixed Dec", Use thousands separator( 1 ), 12, 0 ), Min( 0 ),
			Max( 4 ), Inc( 2 ), Minor Ticks( 0 )}
		),
		Dispatch(
			{"Probit 4P", "Plot"},
			"16",
			ScaleBox,
			{Scale( "Log" ), Format( "Scientific", 12 ), Min( 0.0000001 ),
			Max( 0.1 ), Inc( 2 ), Minor Ticks( 0 )}
		)
	)
	

);


FC &amp;lt;&amp;lt; journal;
FC &amp;lt;&amp;lt; close window;);

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;That works fine for me&amp;nbsp;and I have the output of a journal with each Fit Curve with the model comparison, plot of the data, model info (including prediction model, summary of fit, *~*parameter estimates*~*, correlation of estimates, covariance of estimate, and plots of the modeled curve).&amp;nbsp; I can manually right click on the parameter estimates and "Make Into Combined Data Table" but don't know how to do it in a script.&amp;nbsp; Ideally, i would only have one data table at the end with columns for Animal, Parameter (growth rate, inflection point, lower asymptote, upper asymptote) Group ( these are my time points), Estimate, Std Error, Lower 95%, Upper 95%.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated! Thanks!&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 21:21:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Extracting-parameter-estimates-from-nonlinear-sigmoidal-curve/m-p/69099#M35001</guid>
      <dc:creator>lakepotter</dc:creator>
      <dc:date>2018-08-21T21:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting parameter estimates from nonlinear (sigmoidal) curve fit - scripting</title>
      <link>https://community.jmp.com/t5/Discussions/Extracting-parameter-estimates-from-nonlinear-sigmoidal-curve/m-p/69132#M35008</link>
      <description>&lt;P&gt;Here is an example, not exactly your specific example (this example uses By). I don't know your expertise in navigating a report window.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Nonlinear Examples/Bioassay.jmp" );
obj = Fit Curve( Y( :Toxicity ), X( :log Conc ), By( :formulation ) );
obj &amp;lt;&amp;lt; Fit Logistic 4P( Custom Inverse Prediction( Response( 0.9 ) ) );

//you can get one table using Make Combined Data Table
est_tbl= report(obj[1])["Parameter Estimates"][TableBox(1)] &amp;lt;&amp;lt; Make Combined Data Table;
est_tbl &amp;lt;&amp;lt; Set Name("Parameter Estimates");


inv_tbl = report(obj[1])["Inverse Prediction"]["Predicted Values"][TableBox(1)] &amp;lt;&amp;lt; Make Combined Data Table;
inv_tbl &amp;lt;&amp;lt; Set Name("Inverse Prediction");

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 06:31:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Extracting-parameter-estimates-from-nonlinear-sigmoidal-curve/m-p/69132#M35008</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-08-22T06:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting parameter estimates from nonlinear (sigmoidal) curve fit - scripting</title>
      <link>https://community.jmp.com/t5/Discussions/Extracting-parameter-estimates-from-nonlinear-sigmoidal-curve/m-p/69144#M35015</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you have a handle to your journal, you can navigate the journal as shown below (similar to the post by&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/70"&gt;@gzmorgan0&lt;/a&gt;)&amp;nbsp;to generate the data table of combined Parameter Estimates.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;jrn = Current Journal();
paramEst =&amp;nbsp;jrn["Parameter Estimates"][Table Box( 1 )] &amp;lt;&amp;lt; Make Combined Data Table;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I hope this is helpful!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 12:50:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Extracting-parameter-estimates-from-nonlinear-sigmoidal-curve/m-p/69144#M35015</guid>
      <dc:creator>Wendy_Murphrey</dc:creator>
      <dc:date>2018-08-22T12:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting parameter estimates from nonlinear (sigmoidal) curve fit - scripting</title>
      <link>https://community.jmp.com/t5/Discussions/Extracting-parameter-estimates-from-nonlinear-sigmoidal-curve/m-p/69207#M35023</link>
      <description>&lt;P&gt;Awesome!&amp;nbsp;&lt;SPAN&gt;Thanks so much for the answer - it defintely works for exactly what I need it for!! I'm just still trying to figure out what's going on underneath your code so I can use it in different applications in the future.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this just indexing the journal by name, specifing that I do want the table box and making a new data table?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had seen other responses like&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt2 = bivRep [1] [TableBox(3)]  &amp;lt;&amp;lt; Make Combined Data Table;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;but couldn't figure out what was really going on. Would this one take the third table box found in the first section (?) of bivRep and write out to a new dt?&amp;nbsp;&lt;/SPAN&gt;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am exploring a little but more and was able to get the Summary of Fit with&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;jrn["Summary of Fit"][Table Box (1)] &amp;lt;&amp;lt; Make Combined Data Table;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;but couldn't figure out how to do something like get the Correlation of Estimates for Week 5.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;covar_pre = jrn["Covariance of Estimates"]["Week 5"][Table Box(1)] &amp;lt;&amp;lt; Make Combined Table;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;And got the error:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Cannot subscript Display Box{400} in access or evaluation of 'Subscript' , jrn["Covariance of Estimates"]["pre"][/*###*/Table Box( 1 )]

In the following script, error marked by /*###*/
paramEst = jrn["Covariance of Estimates"]["Week 5"][/*###*/Table Box( 1 )] &amp;lt;&amp;lt;
Make Combined Data Table&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;I guess *this* output is not a table box? I am not sure what sort of data it is and am not sure how to figure it out.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 17:08:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Extracting-parameter-estimates-from-nonlinear-sigmoidal-curve/m-p/69207#M35023</guid>
      <dc:creator>lakepotter</dc:creator>
      <dc:date>2018-08-22T17:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting parameter estimates from nonlinear (sigmoidal) curve fit - scripting</title>
      <link>https://community.jmp.com/t5/Discussions/Extracting-parameter-estimates-from-nonlinear-sigmoidal-curve/m-p/69246#M35036</link>
      <description>&lt;P&gt;My experience in navigating a report window is essentially zero.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I searched the scripting guide for report window and didn't find much. Any resources you could point me towards?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 22:36:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Extracting-parameter-estimates-from-nonlinear-sigmoidal-curve/m-p/69246#M35036</guid>
      <dc:creator>lakepotter</dc:creator>
      <dc:date>2018-08-22T22:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting parameter estimates from nonlinear (sigmoidal) curve fit - scripting</title>
      <link>https://community.jmp.com/t5/Discussions/Extracting-parameter-estimates-from-nonlinear-sigmoidal-curve/m-p/69253#M35038</link>
      <description>&lt;P&gt;Use&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;jrn["Correlation of Estimates"][MatrixBox(1)] &amp;lt;&amp;lt; Make Combined Data Table;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Go to Main Menu&amp;gt; Help &amp;gt;Books &amp;gt; JMP Scripting Guide then open the PDF and scroll to Chapter 11, Display Trees.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A JMP report is a list of nested display boxes.&amp;nbsp; This will show you how to find objects and send messages.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;jrn &amp;lt;&amp;lt; show tree structure;

//or right click on a reveal button to the left of an outline box
// then select Edit, Show Tree Structure&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 23:21:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Extracting-parameter-estimates-from-nonlinear-sigmoidal-curve/m-p/69253#M35038</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-08-22T23:21:06Z</dc:date>
    </item>
  </channel>
</rss>

