<?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: Getting Prediction Formula from Parameter Estimates in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Getting-Prediction-Formula-from-Parameter-Estimates/m-p/259489#M50943</link>
    <description>&lt;P&gt;Have you tried&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;fd= fm &amp;lt;&amp;lt; publish prediction formula;

formula_function= fd &amp;lt;&amp;lt; copy formula as function;
formula_transform = fd &amp;lt;&amp;lt; copy formula as transform;
formula_sas = fd &amp;lt;&amp;lt; generate sas code(No Editor);
formula_python = fd &amp;lt;&amp;lt; generate python code(No Editor);
formula_c= fd &amp;lt;&amp;lt; generate C Code(No Editor);
formula_java = fd &amp;lt;&amp;lt; generate JavaScript Code(No Editor);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;?&lt;/P&gt;</description>
    <pubDate>Tue, 21 Apr 2020 16:29:03 GMT</pubDate>
    <dc:creator>MathStatChem</dc:creator>
    <dc:date>2020-04-21T16:29:03Z</dc:date>
    <item>
      <title>Getting Prediction Formula from Parameter Estimates</title>
      <link>https://community.jmp.com/t5/Discussions/Getting-Prediction-Formula-from-Parameter-Estimates/m-p/259449#M50938</link>
      <description>&lt;P&gt;Don't know if this is SAS IP or not, but if not does anyone have a function for turning parameter estimates (for any data type/modeling type/model), into the prediction formula JMP uses.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;I can't use the normal "Get Prediction Formula" because ... reasons.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to do something like this. The type of model doesn't matter too much to me. But if it does for the calculation,&amp;nbsp; let's start simple.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here (1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
dt &amp;lt;&amp;lt; Clear Select();
r = dt &amp;lt;&amp;lt; Select Rows( 28::40 );
r &amp;lt;&amp;lt; Hide and Exclude;
dt &amp;lt;&amp;lt; Clear Select();
dt:sex[[3, 6, 9, 12, 27]] = "G";

fm = dt &amp;lt;&amp;lt; Fit Model(
	Y( :height ),
	Effects( :age[:sex], :sex, :weight, :sex * :weight, :age * :weight[:sex] ),
	Personality( "Generalized Regression" ),
	Generalized Distribution( "Normal" ),
	Run( Fit( Estimation Method( Lasso ), Validation Method( AICc ) ) )
);
pred = fm &amp;lt;&amp;lt; (fit[1] &amp;lt;&amp;lt; Get Prediction Formula);

// what I want
prediction_from_estimates = function({fm}, 
	{DEFAULT LOCAL}, 
	olb = report(fm)[OutlineBox("Parameter Estimates?")];
	terms = olb[StringColBox("Term")] &amp;lt;&amp;lt; Get;
	est = olb[NumberColBox("Estimate")] &amp;lt;&amp;lt; Get;
	
	// do some stuff
	return(prediction_formula)
);

// and I'd like it to be able to do 
other_pred = prediction_from_estimates(fm);
nameexpr(pred) == nameexpr(other_pred); // true
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I'd also take any references to read up on.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 14:49:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Getting-Prediction-Formula-from-Parameter-Estimates/m-p/259449#M50938</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2020-04-21T14:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Prediction Formula from Parameter Estimates</title>
      <link>https://community.jmp.com/t5/Discussions/Getting-Prediction-Formula-from-Parameter-Estimates/m-p/259489#M50943</link>
      <description>&lt;P&gt;Have you tried&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;fd= fm &amp;lt;&amp;lt; publish prediction formula;

formula_function= fd &amp;lt;&amp;lt; copy formula as function;
formula_transform = fd &amp;lt;&amp;lt; copy formula as transform;
formula_sas = fd &amp;lt;&amp;lt; generate sas code(No Editor);
formula_python = fd &amp;lt;&amp;lt; generate python code(No Editor);
formula_c= fd &amp;lt;&amp;lt; generate C Code(No Editor);
formula_java = fd &amp;lt;&amp;lt; generate JavaScript Code(No Editor);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 16:29:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Getting-Prediction-Formula-from-Parameter-Estimates/m-p/259489#M50943</guid>
      <dc:creator>MathStatChem</dc:creator>
      <dc:date>2020-04-21T16:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Prediction Formula from Parameter Estimates</title>
      <link>https://community.jmp.com/t5/Discussions/Getting-Prediction-Formula-from-Parameter-Estimates/m-p/259490#M50944</link>
      <description>&lt;P&gt;It's not that I can't use the native values.&amp;nbsp; It's that I have a table of parameter values from a simulate table and I'm trying to average them and create a prediction formula based on that.&amp;nbsp; I could save the prediction formula and then do a substitute, but that seems very prone to error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 16:32:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Getting-Prediction-Formula-from-Parameter-Estimates/m-p/259490#M50944</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2020-04-21T16:32:26Z</dc:date>
    </item>
  </channel>
</rss>

