cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Mcc99
Level III

JSL script for Inverse prediction of one single value

I commonly use JSL to inverse predict a whole column of values, however I now need to inverse predict one single value from multiple curves in order to calculate an endpoint titer where the curve crosses a predefined threshold. The script I normally use is below, how can I modify it to inverse predict one value? Is the best way to make a new column with one value or to have a place in the code to put the value?

fc=Data Table( "Ab" ) << Fit Curve(
	Y( :Ave OD ),
	X( :"Log10[Dilution]" ),
Fit Logistic 4P(Save Inverse Prediction Formula),
	By( :Sample)
	
);

Thanks!

1 REPLY 1

Re: JSL script for Inverse prediction of one single value

One way would be to just send a value to the Profiler, then read the prediction. Here's an example:

Names Default To Here (1);
dt = open ("$SAMPLE_DATA/Big Class.jmp");
fc = Fit Curve(
	Y( :weight ),
	X( :height ),
	Fit Logistic 4P(
		Profiler(
			1,
			Confidence Intervals( 1 ),
			Term Value( :height( 62.55, Lock( 0 ), Show( 1 ) ) )
		)
	),
	SendToReport(
		Dispatch( {"Logistic 4P"}, "Parameter Estimates", OutlineBox, {Close( 1 )} )
	)
);
//set the X axis to 65
Report(fc)["Logistic 4P","Prediction Profiler",NumberEditBox(1)] << set (65);
//read and display the prediction for Y
prediction = Report(fc)["Logistic 4P","Prediction Profiler",TextBox(10)] << get text;
show (num(prediction));

/*JMP STATISTICAL DISCOVERY LLC (“JMP”) PERMITS THE USE OF THIS COMPUTER SOFTWARE CODE (“CODE”) ON AN AS-IS BASIS AND AUTHORIZES YOU TO USE THE CODE SUBJECT TO THE TERMS LISTED HEREIN.  BY USING THE CODE, YOU AGREE TO THESE TERMS.  YOUR USE OF THE CODE IS AT YOUR OWN RISK.  JMP MAKES NO REPRESENTATION OR WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRIGEMENT, AND TITLE, WITH RESPECT TO THE CODE.
You may use the Code solely as part of a software product you currently have licensed from JMP, JMP’s parent company SAS Institute Inc. (“SAS”), or one of JMP’s or SAS’s subsidiaries or authorized agents (the “Software”), and not for any other purpose.  The Code is designed to add functionality to the Software but has not necessarily been tested.  Accordingly, JMP makes no representation or warranty that the Code will operate error-free.  JMP is under no obligation to maintain, support, or continue to distribute the Code.
Neither JMP nor its licensors shall be liable to you or any third-party for any general, special, direct, indirect, consequential, incidental, or other damages whatsoever arising out of or related to your use or inability to use the Code, even if JMP has been advised of the possibility of such damages.  Except as otherwise provided above, the Code is governed by the same agreement that governs the Software.  If you do not have an existing agreement with JMP or SAS governing the Software, you may not use the Code.
JMP and all other JMP Statistical Discovery LLC product or service names are registered trademarks or trademarks of JMP Statistical Discovery LLC in the USA and other countries.  ® indicates USA registration.  Other brand and product names are registered trademarks or trademarks of their respective companies.
*/

Recommended Articles