<?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 Trying to JSL script and get the maximum desirability from RSM design in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Trying-to-JSL-script-and-get-the-maximum-desirability-from-RSM/m-p/893833#M105460</link>
    <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;New user of JMP. I'm using the student trial version, and I want to use the JSL script to use RSM design. Here's how far I got...&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

// Here are the factors and the ranges
factors = {
	{"X1", 0, 1, "Continuous"},
	{"X2", 0, 1, "Continuous"},
	{"X3", 0, 1, "Continuous"}
};

rsm = DOE( Response Surface Design );

// Add a response
rsm &amp;lt;&amp;lt; AddResponse( Minimize, "Y");

// Add the factors. We will need to overwrite the defaults
// overwrite the two built‑ins
For( i = 1, i &amp;lt;= Min( N Items( factors ), 2 ), i++,
	rsm &amp;lt;&amp;lt; Change Factor Settings( i, factors[i][2], factors[i][3], factors[i][1] );
);

// add any remaining
For( i = 3, i &amp;lt;= N Items( factors ), i++,
	rsm &amp;lt;&amp;lt; Add Factor( Continuous, factors[i][2], factors[i][3], factors[i][1], 0 );
);

rsm &amp;lt;&amp;lt; Set Random Seed( 30624700 );
rsm &amp;lt;&amp;lt; Make Design( 2 );
rsm &amp;lt;&amp;lt; Set Axial Choice( 4 );
rsm &amp;lt;&amp;lt; Center Points( 0 );
rsm &amp;lt;&amp;lt; Make Table;

dt = Current Data Table();

// Set the response here
yvals = { 1.23, 0.98, 1.05, 0.76, 1.12, 1.23, 0.98, 1.05, 0.76, 1.12, 1.23, 0.98, 1.05, 0.76};
dt:Y &amp;lt;&amp;lt; Set Values( yvals );

///////////////////////////
/////// Fit the RSM ///////
///////////////////////////

// Fit the RSM
fm = dt &amp;lt;&amp;lt; Fit Model;
fls = fm &amp;lt;&amp;lt;  Run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;I got as far as getting the data table with the factors and inserting some dummy yvals. I can fit the quadratic model, and run that. It seems that I get some sort of a report object, but I want to use the "Prediction Profiler", "Maximize desirability", and "Remember" the optimal. I want to add those suggested optimal factors into the data table. These keywords are all found in the Scripting Index, but I cannot figure out how to make this work in JSL.&lt;BR /&gt;&lt;BR /&gt;Any help would be super appreciated! Thank you so much.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Aug 2025 03:20:31 GMT</pubDate>
    <dc:creator>NormalCrocodile</dc:creator>
    <dc:date>2025-08-12T03:20:31Z</dc:date>
    <item>
      <title>Trying to JSL script and get the maximum desirability from RSM design</title>
      <link>https://community.jmp.com/t5/Discussions/Trying-to-JSL-script-and-get-the-maximum-desirability-from-RSM/m-p/893833#M105460</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;New user of JMP. I'm using the student trial version, and I want to use the JSL script to use RSM design. Here's how far I got...&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

// Here are the factors and the ranges
factors = {
	{"X1", 0, 1, "Continuous"},
	{"X2", 0, 1, "Continuous"},
	{"X3", 0, 1, "Continuous"}
};

rsm = DOE( Response Surface Design );

// Add a response
rsm &amp;lt;&amp;lt; AddResponse( Minimize, "Y");

// Add the factors. We will need to overwrite the defaults
// overwrite the two built‑ins
For( i = 1, i &amp;lt;= Min( N Items( factors ), 2 ), i++,
	rsm &amp;lt;&amp;lt; Change Factor Settings( i, factors[i][2], factors[i][3], factors[i][1] );
);

// add any remaining
For( i = 3, i &amp;lt;= N Items( factors ), i++,
	rsm &amp;lt;&amp;lt; Add Factor( Continuous, factors[i][2], factors[i][3], factors[i][1], 0 );
);

rsm &amp;lt;&amp;lt; Set Random Seed( 30624700 );
rsm &amp;lt;&amp;lt; Make Design( 2 );
rsm &amp;lt;&amp;lt; Set Axial Choice( 4 );
rsm &amp;lt;&amp;lt; Center Points( 0 );
rsm &amp;lt;&amp;lt; Make Table;

dt = Current Data Table();

// Set the response here
yvals = { 1.23, 0.98, 1.05, 0.76, 1.12, 1.23, 0.98, 1.05, 0.76, 1.12, 1.23, 0.98, 1.05, 0.76};
dt:Y &amp;lt;&amp;lt; Set Values( yvals );

///////////////////////////
/////// Fit the RSM ///////
///////////////////////////

// Fit the RSM
fm = dt &amp;lt;&amp;lt; Fit Model;
fls = fm &amp;lt;&amp;lt;  Run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;I got as far as getting the data table with the factors and inserting some dummy yvals. I can fit the quadratic model, and run that. It seems that I get some sort of a report object, but I want to use the "Prediction Profiler", "Maximize desirability", and "Remember" the optimal. I want to add those suggested optimal factors into the data table. These keywords are all found in the Scripting Index, but I cannot figure out how to make this work in JSL.&lt;BR /&gt;&lt;BR /&gt;Any help would be super appreciated! Thank you so much.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2025 03:20:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Trying-to-JSL-script-and-get-the-maximum-desirability-from-RSM/m-p/893833#M105460</guid>
      <dc:creator>NormalCrocodile</dc:creator>
      <dc:date>2025-08-12T03:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to JSL script and get the maximum desirability from RSM design</title>
      <link>https://community.jmp.com/t5/Discussions/Trying-to-JSL-script-and-get-the-maximum-desirability-from-RSM/m-p/893846#M105461</link>
      <description>&lt;P&gt;I think you have to find a reference to the profiler platform. You can do it by finding reference to the Prediction Profiler outline box and then using &amp;lt;&amp;lt; Get Scriptable Object&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;profiler_ob = (Report(fls) &amp;lt;&amp;lt; XPath("//OutlineBox[@helpKey='Profiler']"))[1];
pf = profiler_ob &amp;lt;&amp;lt; Get Scriptable Object;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You should also be able to get the reference via report subscripting&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;profiler_ob = Report(fls)[OutlineBox("Prediction Profiler")];
pf = profiler_ob &amp;lt;&amp;lt; Get Scriptable Object;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;After that you can use pf as you would Profiler object, for example&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;pf &amp;lt;&amp;lt; Maximize Desirability;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Aug 2025 05:11:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Trying-to-JSL-script-and-get-the-maximum-desirability-from-RSM/m-p/893846#M105461</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-08-12T05:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to JSL script and get the maximum desirability from RSM design</title>
      <link>https://community.jmp.com/t5/Discussions/Trying-to-JSL-script-and-get-the-maximum-desirability-from-RSM/m-p/893942#M105483</link>
      <description>&lt;P&gt;Amazing! Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2025 14:43:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Trying-to-JSL-script-and-get-the-maximum-desirability-from-RSM/m-p/893942#M105483</guid>
      <dc:creator>NormalCrocodile</dc:creator>
      <dc:date>2025-08-12T14:43:31Z</dc:date>
    </item>
  </channel>
</rss>

