For the latest version of JMP Help, visit JMP.com/help.


Publication date: 04/21/2023

Matrices and Reports

Using JSL, you can extract matrices of values from reports. First, you need to locate the items that you want to extract. This information is in the tree structure of the report.

Run the following script to create a table of parameter estimates in a Bivariate report:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" ) ;
biv = dt << Bivariate( X( height ), Y( weight ), Fit Line );

Now, open the tree structure to identify which item contains the parameter estimates:

Right-click a gray disclosure icon and select Edit > Show Tree Structure.

The parameter estimates are contained in NumberColBox(13). Continue with the script:

colBox = Report( biv )[Number Col Box( 13 )];
beta = colBox << Get As Matrix;

[-127.145248610915, 3.711354893859555]

Notes:

When a variable contains a reference to a table box, Get As Matrix() creates a matrix A that contains the values from all numeric columns in the table:

A = tableBox << Get As Matrix;

When a variable contains a reference to a numeric column in a report table, Get As Matrix() creates a matrix A as a column vector of values from that column.

A = colBox << Get As Matrix;
Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).