<?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 Fit Spline By Group: Save Spline Coefficients to Column? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Fit-Spline-By-Group-Save-Spline-Coefficients-to-Column/m-p/59394#M32592</link>
    <description>&lt;P&gt;Hi all--having an issue.&amp;nbsp; I am using Fit Y by X to fit 5,000 separate regressions.&amp;nbsp;&amp;nbsp;I hold control, select red drop-down arrow, and&amp;nbsp;Fit-&amp;gt;Flexible, Fit-&amp;gt;Spline and select, say, 0.1.&amp;nbsp; &amp;nbsp;This fits a spline to all 5,000 graphs with lambda of 0.1.&amp;nbsp; I have 28 X values in each of 5,000 graphs, and I understand there are 4 different spline coefficients (A, B, C, D).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand if&amp;nbsp;I just had 1 regression, I could select "Save Coefficients" and a nifty Bx5 matrix, (where&amp;nbsp;B is a subset of my X values) table will pop out with each row as an&amp;nbsp;B value and columns 2-5 as the values of my spline function,&amp;nbsp;for each discrete value of B.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I do this fitting "By Group" with 5,000 regressions, I get 5,000 of these tables as outputs!&amp;nbsp; &amp;nbsp;I would like a way to either:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Get 1 table that contains all of the&amp;nbsp;knot spline function values for all values of&amp;nbsp;B&amp;nbsp;(ie &amp;nbsp;for all "By: Groups" (instead of 5000 separate tables)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or:&lt;/P&gt;&lt;P&gt;2) Be able to get Spline value A from spline function as its own column in the original datatable, get Spline value B from spline function as its own column in original datatable, etc. where spline values A, B, C, D pertain to the correct discrete&amp;nbsp;B&amp;nbsp;value&amp;nbsp;and the correct By: Group&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know if I just I hit Ctrl and "Save Predicteds" after Fit Y by X, there will be a column saved to the original datatable with ~5000 formulas (JMP says "Huge formula with 5000&amp;nbsp;items).&amp;nbsp; &amp;nbsp;It is a conditional formula that looks for the By: Group, then does Spline Eval(X, [28x5]) for each group.&amp;nbsp; &amp;nbsp;Is there a way I can use this script and do find/replace to extract the Spline Coefficient?&amp;nbsp; Maybe there is some unique JSL thing to do?&amp;nbsp; How do I get these darn coefficients???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also understand there is a Spline Coef(x, y, lambda) thing in JSL but I don't understand jsl syntax at all and am dimwitted in programming, in general.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any advice and your time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jun 2018 22:49:55 GMT</pubDate>
    <dc:creator>M0gAl0g</dc:creator>
    <dc:date>2018-06-05T22:49:55Z</dc:date>
    <item>
      <title>Fit Spline By Group: Save Spline Coefficients to Column?</title>
      <link>https://community.jmp.com/t5/Discussions/Fit-Spline-By-Group-Save-Spline-Coefficients-to-Column/m-p/59394#M32592</link>
      <description>&lt;P&gt;Hi all--having an issue.&amp;nbsp; I am using Fit Y by X to fit 5,000 separate regressions.&amp;nbsp;&amp;nbsp;I hold control, select red drop-down arrow, and&amp;nbsp;Fit-&amp;gt;Flexible, Fit-&amp;gt;Spline and select, say, 0.1.&amp;nbsp; &amp;nbsp;This fits a spline to all 5,000 graphs with lambda of 0.1.&amp;nbsp; I have 28 X values in each of 5,000 graphs, and I understand there are 4 different spline coefficients (A, B, C, D).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand if&amp;nbsp;I just had 1 regression, I could select "Save Coefficients" and a nifty Bx5 matrix, (where&amp;nbsp;B is a subset of my X values) table will pop out with each row as an&amp;nbsp;B value and columns 2-5 as the values of my spline function,&amp;nbsp;for each discrete value of B.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I do this fitting "By Group" with 5,000 regressions, I get 5,000 of these tables as outputs!&amp;nbsp; &amp;nbsp;I would like a way to either:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Get 1 table that contains all of the&amp;nbsp;knot spline function values for all values of&amp;nbsp;B&amp;nbsp;(ie &amp;nbsp;for all "By: Groups" (instead of 5000 separate tables)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or:&lt;/P&gt;&lt;P&gt;2) Be able to get Spline value A from spline function as its own column in the original datatable, get Spline value B from spline function as its own column in original datatable, etc. where spline values A, B, C, D pertain to the correct discrete&amp;nbsp;B&amp;nbsp;value&amp;nbsp;and the correct By: Group&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know if I just I hit Ctrl and "Save Predicteds" after Fit Y by X, there will be a column saved to the original datatable with ~5000 formulas (JMP says "Huge formula with 5000&amp;nbsp;items).&amp;nbsp; &amp;nbsp;It is a conditional formula that looks for the By: Group, then does Spline Eval(X, [28x5]) for each group.&amp;nbsp; &amp;nbsp;Is there a way I can use this script and do find/replace to extract the Spline Coefficient?&amp;nbsp; Maybe there is some unique JSL thing to do?&amp;nbsp; How do I get these darn coefficients???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also understand there is a Spline Coef(x, y, lambda) thing in JSL but I don't understand jsl syntax at all and am dimwitted in programming, in general.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any advice and your time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 22:49:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Fit-Spline-By-Group-Save-Spline-Coefficients-to-Column/m-p/59394#M32592</guid>
      <dc:creator>M0gAl0g</dc:creator>
      <dc:date>2018-06-05T22:49:55Z</dc:date>
    </item>
  </channel>
</rss>

