Hi,
I am trying to come up to speed on extracting values from a report called by a script.
To test things out I create two simple columns and do a fit and I am trying to extract the intercept from the estimate just so I know what I am doing.
Test=Bivariate(
Y( :Column 2 ),
X( :Column 1 ),
Fit Line( {Line Color( {208, 64, 86} )} )
);
r=test<<report;
fred=r[outlinebox("Linear Fit"),Outlinebox("Parameter Estimates"),ColBox("Estimate")[1]]<<get(1);
show(fred);
I am trying (obviously unsuccessfully) to follow the example in the manual and I am getting an error as show in the log window
index{100} in access or evaluation of 'Get' , Get( 1 ) /*###*/
What should this test script look like?
Hi,
There is a little syntax error in this section of the code:
fred=r[outlinebox("Linear Fit"),Outlinebox("Parameter Estimates"),ColBox("Estimate")[1]]<<get(1);
The column box reference is a number column box in the report, so try using NumberColBox. Also, Put the reference of the first value inside the () instead of outside and remove the [ ]. Put a comma between the title and the number reference. See below
fred=r[OutlineBox("Linear Fit"),OutlineBox("Parameter Estimates"),NumberColBox("Estimate",1)]<<get(1);
That should work for you.
Best Regards,
Chris Kirchberg
I was fishing through the scripting manual and in the section on invisible reports (pg 384 on manual for Version 12)yields a different syntax that eschews the get directive completely and uses a term columnbox which does not appear to be a reserved word because it is not showing up in blue font color. This also works. If I use the properties window to examine the report, The "estimate" is listed as a "col box"
Test=Bivariate(
Y( :Column 2 ),
X( :Column 1 ),
Fit Line( {Line Color( {208, 64, 86} )} )
);
r=test<<report;
//fred=r[Col Box("Estimate")][2];
fred=r[outlinebox("Linear Fit"),Outlinebox("Parameter Estimates"),ColumnBox("Estimate")][1];
show(fred);
Yup, that will work as long as you don't use the Get Message.
Where can I find the "properties window"?
I need to extract data from a table in a report and need to find the correct path. Apparently the "properties window" could be used for that purpose but I don't know where to find that...
To be more precise, I would like to extract the values from the validation and training tables below in JSL.
Below is a simple example on how to output the information from the 2 tables into a data table. Learning about how to deal with JMP Output Display Trees increases a JMP users capabilities exponentially. The documentation on Display Trees is found in the Scripting Guide in the JMP Documentation Library
Help==>JMP Documentation Library
Here is the script
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
neur = dt << Neural(
Y( :NPN1 ),
X( :PNP1, :PNP2, :NPN2, :PNP3, :IVP1, :PNP4, :NPN3 ),
Informative Missing( 0 ),
Validation Method( "Holdback", 0.3333 ),
Fit( NTanH( 3 ) )
);
Report( neur )["Training"][Table Box( 1 )] << Make Combined Data Table;
Thanks for providing the script. I does pretty much what I needed. However, there is a point I don't understand:
This is the table I get. It includes the measures for the training and the validation data.
However the last line of the script refers explicitly to the training data:
Report( neur )["Training"][Table Box( 1 )] << Make Combined Data Table;
Why does the table also include the information about the validation data?
NB: Removing the part ["Training"] from the last line leads to the same result.
To extract just the information from the first TableBox under the "Validation" OutlineBox, change to the following:
Report( neur )["Validation"][Table Box( 1 )] << Make into Data Table;
The <<Make into Data Table message creates the data table from the values in that TableBox only.