<?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 How to save a prediction formula column with a specific name via JSL? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-save-a-prediction-formula-column-with-a-specific-name-via/m-p/9731#M9518</link>
    <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am running some generalised linear model via a JSL script.&lt;/P&gt;
&lt;P&gt;How can I save the prediction formula to a column with a specific name?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All I managed to find (&lt;A href="https://community.jmp.com/message/100865" target="_blank"&gt;Automate saving of prediction formula using JMP script?&lt;/A&gt;) was something like:&lt;/P&gt;
&lt;P&gt;GLM = Fit Model (......);&lt;/P&gt;
&lt;P&gt;GLM &amp;lt;&amp;lt; prediction formula;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) can I choose the name of the column which will store the prediction formula? JMP will automatically save it to: "Pred Formula 'Target Variable'"&lt;/P&gt;
&lt;P&gt;2) Is this functionality documented anywhere? I found it on the forum above, but not in JMP's documentation&lt;/P&gt;
&lt;P&gt;3) Does the same syntax work for other platforms (e.g. partition)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Sep 2017 17:14:24 GMT</pubDate>
    <dc:creator>jumper</dc:creator>
    <dc:date>2017-09-19T17:14:24Z</dc:date>
    <item>
      <title>How to save a prediction formula column with a specific name via JSL?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-save-a-prediction-formula-column-with-a-specific-name-via/m-p/9731#M9518</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am running some generalised linear model via a JSL script.&lt;/P&gt;
&lt;P&gt;How can I save the prediction formula to a column with a specific name?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All I managed to find (&lt;A href="https://community.jmp.com/message/100865" target="_blank"&gt;Automate saving of prediction formula using JMP script?&lt;/A&gt;) was something like:&lt;/P&gt;
&lt;P&gt;GLM = Fit Model (......);&lt;/P&gt;
&lt;P&gt;GLM &amp;lt;&amp;lt; prediction formula;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) can I choose the name of the column which will store the prediction formula? JMP will automatically save it to: "Pred Formula 'Target Variable'"&lt;/P&gt;
&lt;P&gt;2) Is this functionality documented anywhere? I found it on the forum above, but not in JMP's documentation&lt;/P&gt;
&lt;P&gt;3) Does the same syntax work for other platforms (e.g. partition)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 17:14:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-save-a-prediction-formula-column-with-a-specific-name-via/m-p/9731#M9518</guid>
      <dc:creator>jumper</dc:creator>
      <dc:date>2017-09-19T17:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: JSL scripting: how to save prediction formulae?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-save-a-prediction-formula-column-with-a-specific-name-via/m-p/9732#M9519</link>
      <description>&lt;P&gt;Generally 'Save Prediction Formula' is consistent across platforms. The name(s) of the saved columns are indeed fixed, but you can rename them using things like:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open("$SAMPLE_DATA/Big Class.jmp");
cols = dt &amp;lt;&amp;lt; GetColumnNames("String");
For(c=1, c&amp;lt;=NItems(cols), c++,
  Column(dt, cols[c]) &amp;lt;&amp;lt; SetName("New "||cols[c]);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;On rare occasions it can be helpful to use 'Get Column Names' before and after the columns are created, comparing the two lists to infer the names of the new columns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 20:00:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-save-a-prediction-formula-column-with-a-specific-name-via/m-p/9732#M9519</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2017-09-19T20:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: JSL scripting: how to save prediction formulae?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-save-a-prediction-formula-column-with-a-specific-name-via/m-p/9733#M9520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mmm, it sounds very convoluted. What I have found is that if my target variable is called "My Target", the column will be called "Pred Formula My Target", so I use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="ruby" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14128581804197954" jivemacro_uid="_14128581804197954"&gt;&lt;BR /&gt;&lt;P&gt;GLM = Fit Model (......);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;GLM &amp;lt;&amp;lt; prediction formula;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Column("Pred Formula My Target") &amp;lt;&amp;lt; Set Name("New Column Name");&lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How about documentation? Is this properly documented anywhere in the JSL documentation? I haven't managed to find it. I am new to JMP scripting, but first impressions are that it is a powerful language with a convoluted syntax and poor documentation, a bit like R in a way - but I would expect better documentation from a commercial software!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, I create another column which multiplies the prediction by something else:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14128582112694246 jive_text_macro" jivemacro_uid="_14128582112694246"&gt;&lt;BR /&gt;&lt;P&gt;New Column("My new calculation", Numeric, Formula( :"My saved Prediction" * :another_field ));&lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where "My saved prediction" has spaces in the name, another_field does not. The formula is calculated correctly, but if I right click on the heading and go to formula, I see an empty box multiplied by another_field. Is this a bug in JMP? Should I have specified the formula differently?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2014 12:37:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-save-a-prediction-formula-column-with-a-specific-name-via/m-p/9733#M9520</guid>
      <dc:creator>jumper</dc:creator>
      <dc:date>2014-10-09T12:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: JSL scripting: how to save prediction formulae?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-save-a-prediction-formula-column-with-a-specific-name-via/m-p/9734#M9521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The empty box may indicate that the column :My saved Prediction (should not be within double quotes) does not exist in the current data table. Check spelling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding documentation for JSL, I think that the &lt;EM&gt;Scripting Index&lt;/EM&gt; (Help menu) is a great resource, packed with ready-to-use examples. And yes, &lt;EM&gt;&amp;lt;&amp;lt; Prediction Formula&lt;/EM&gt; is there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2014 12:56:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-save-a-prediction-formula-column-with-a-specific-name-via/m-p/9734#M9521</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2014-10-09T12:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: JSL scripting: how to save prediction formulae?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-save-a-prediction-formula-column-with-a-specific-name-via/m-p/9735#M9522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I removed the double quotes from :My Saved prediction and now it all works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for pointing me to the Scripting Index - very useful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2014 13:10:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-save-a-prediction-formula-column-with-a-specific-name-via/m-p/9735#M9522</guid>
      <dc:creator>jumper</dc:creator>
      <dc:date>2014-10-09T13:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to save a prediction formula column with a specific name via JSL?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-save-a-prediction-formula-column-with-a-specific-name-via/m-p/44811#M25645</link>
      <description>&lt;P&gt;Continuing your example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;GLM = Fit Model (......);
pf = GLM &amp;lt;&amp;lt; prediction formula;
pf &amp;lt;&amp;lt; Set Name( "my name" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Yes, this approach should work with any of the modeling platforms.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 17:17:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-save-a-prediction-formula-column-with-a-specific-name-via/m-p/44811#M25645</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2017-09-19T17:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: JSL scripting: how to save prediction formulae?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-save-a-prediction-formula-column-with-a-specific-name-via/m-p/44812#M25646</link>
      <description>&lt;P&gt;Ian's reply answers concerns #1 and #3, while user ms answers question #2 about documentation surrounding the JMP Scripting Language (JSL).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3605"&gt;@ian_jmp&lt;/a&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Generally 'Save Prediction Formula' is consistent across platforms. The name(s) of the saved columns are indeed fixed, but you can rename them using things like:&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-jsl"&gt;&lt;CODE class="  language-jsl"&gt;dt &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Open&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"$SAMPLE_DATA/Big Class.jmp"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
cols &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; dt &lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt; GetColumnNames&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"String"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token function"&gt;For&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;c&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; c&lt;SPAN class="token operator"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;NItems&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;cols&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; c&lt;SPAN class="token operator"&gt;++&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;
  &lt;SPAN class="token function"&gt;Column&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;dt&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; cols&lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;c&lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt; SetName&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"New "&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;||&lt;/SPAN&gt;cols&lt;SPAN class="token punctuation"&gt;[&lt;/SPAN&gt;c&lt;SPAN class="token punctuation"&gt;]&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;On rare occasions it can be helpful to use 'Get Column Names' before and after the columns are created, comparing the two lists to infer the names of the new columns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/182"&gt;@ms&lt;/a&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regarding documentation for JSL, I think that the &lt;/SPAN&gt;&lt;EM&gt;Scripting Index&lt;/EM&gt;&lt;SPAN&gt; (Help menu) is a great resource, packed with ready-to-use examples. And yes, &lt;/SPAN&gt;&lt;EM&gt;&amp;lt;&amp;lt; Prediction Formula&lt;/EM&gt;&lt;SPAN&gt; is there.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 20:02:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-save-a-prediction-formula-column-with-a-specific-name-via/m-p/44812#M25646</guid>
      <dc:creator>sseligman</dc:creator>
      <dc:date>2017-09-19T20:02:33Z</dc:date>
    </item>
  </channel>
</rss>

