Scripting Guide > Data Structures > Matrices > Matrices and Reports
发布日期: 04/13/2021

Matrices and Reports

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 as follows:

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;
需要更多信息?有问题?从 JMP 用户社区得到解答 (community.jmp.com).