Subscribe Bookmark RSS Feed

Using "Make Into Matrix" in JSL

sebastianhoffme

Community Trekker

Joined:

Mar 27, 2015

Hi folks,

I would like to extract a table out of a report (Multivariate -> Multivariate) into a matrix as part of my script. Currently I am working with this:

 

collist = {:"X1", :"X2", :"X3", :"X4", :"X5"};
 
cor = Eval(Eval Expr(Multivariate(
Y( Expr(collist)),
Estimation Method( "Row-wise" ),
Matrix Format( "Square" ),
Scatterplot Matrix( 0 )
)));
r = (col <<Report)[Outline Box("Correlations")][1][1] << Make into Matrix 

Sadly there is no documentation (?) on the message "Make into matrix" and I cannot figure out how to store the resulting matrix in a variable without the dialog appearing. 

For the moment I will work with "Make into Table". But it would be great to know how to use "Make into matrix".

 

Cheers,

Sebastian

1 ACCEPTED SOLUTION

Accepted Solutions
markbailey

Staff

Joined:

Jun 23, 2011

Solution
dt = Open( "$SAMPLE_DATA/Fitness.jmp" );

multi var = dt << Multivariate(
	Y( :Age, :Weight, :Oxy, :Runtime, :RunPulse, :RstPulse, :MaxPulse ),
	Estimation Method( "Row-wise" ),
	Matrix Format( "Square" ),
	Scatterplot Matrix(
		Density Ellipses( 1 ),
		Shaded Ellipses( 0 ),
		Ellipse Color( 3 )
	)
);

multi var rep = multi var << Report;

corr = multi var rep["Correlations"][MatrixBox(1)] << Get;
Learn it once, use it forever!
4 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

This code will bypass the dialog box.  It uses the standars and documented JSL components

names default to here(1);
dt=open("$SAMPLE_DATA\semiconductor capability.jmp");
collist = {:"NPN1", :"PNP1", :"NPN2", :"PNP2", :"NPN3"};
 
cor = Eval(Eval Expr(Multivariate(//invisible,
Y( Expr(collist)),
Estimation Method( "Row-wise" ),
Matrix Format( "Square" ),
Scatterplot Matrix( 0 )
)));
r = ((cor <<Report)[Outline Box("Correlations")][1][1] << Make into data table(invisible))<<get as matrix
Jim
markbailey

Staff

Joined:

Jun 23, 2011

Solution
dt = Open( "$SAMPLE_DATA/Fitness.jmp" );

multi var = dt << Multivariate(
	Y( :Age, :Weight, :Oxy, :Runtime, :RunPulse, :RstPulse, :MaxPulse ),
	Estimation Method( "Row-wise" ),
	Matrix Format( "Square" ),
	Scatterplot Matrix(
		Density Ellipses( 1 ),
		Shaded Ellipses( 0 ),
		Ellipse Color( 3 )
	)
);

multi var rep = multi var << Report;

corr = multi var rep["Correlations"][MatrixBox(1)] << Get;
Learn it once, use it forever!
sebastianhoffme

Community Trekker

Joined:

Mar 27, 2015

Thanks a lot , Mark. That was just what I was looking for. 

ian_jmp

Staff

Joined:

Jun 23, 2011

It's good that there are workarounds.

 

But, as Sebastian points out 'Make Into Matrix' does not appear in the Scripting Index as a message one can send to a 'MatrixBox()' (and the editor tooltip gives 'unknown message for object'). Yet it does appear as a context choice in the UI, and one can send the message via JSL (both giving the modal dialog he mentions).

 

Using Mark's (or JIm's) method, one could replicate the functionality of the dialog in scripting, but it's still a little strange.