cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
oliver21
Level I

how can i export or save the smoothing in a table.

Hey people,
I have a plot of 12000 values ​​here and can show the smoothing in the graph, but I would like to export this smoothing as a table (values) so that I can later calculate the integral.
how can i export or save the smoothing in a table.
thanksGraphik erstellen.png

3 REPLIES 3
Thierry_S
Super User

Re: how can i export or save the smoothing in a table.

Hi,

In the GrapBuilder window, look for the "Smoother" item (mid to lower left), click on the red triangle and select "Save Formula".

Thierry_S_0-1636379839873.png

Best,

TS

 

Thierry R. Sornasse
txnelson
Super User

Re: how can i export or save the smoothing in a table.

If you use Fit Y by X, and perform a Fit Flexible(Spline), you can set your smoothing function and then Save the Predicteds.

txnelson_0-1636380120289.png

txnelson_1-1636380183669.png

 

 

Jim
ian_jmp
Staff

Re: how can i export or save the smoothing in a table.

Picking up on "So that I can later calculate the integral . . ." you could do this in JSL using this kind of approach:

ames Default To Here( 1 );

// Example data
dt = Open("$SAMPLE_DATA/Big Class.jmp");

// Graph Builder with Smoother
gb = dt << Graph Builder(
					Variables( X( :weight ), Y( :height ) ),
					Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ))
					);
					
// Save the Smoother formula! (see https://community.jmp.com/t5/Discussions/JSL-to-save-smoother-formula-from-Graph-Builder/m-p/417262#M66636)
gbb = Report(gb)[GraphBuilderBox(1)];
gbb << updateElement(1, 1, 2, {Save Formula});

// Get the saved formula from the table
form = Column(dt, "Smoother(height)") << getFormula;

// Make the independant variable 'x'
SubstituteInto(form, Expr(:weight), Expr(x));

// Integrate it between 80 and 140
area = Integrate( form, x, 80, 140 );
Print(area);

// Print area estimated 'by eye'
Print("Area estimate: "||Char(62.5 * (140 - 80)));