cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
simon_2
Level III

How to remove summary statistics from Journal using JSL

Hello,

 

I am trying to remove summary statistics from a journal using JSL. Earlier I received help about removing statistics just for one graph but I ran into problems when I had multiple graphs in a journal. Here is a snapshot of one graph in my journal.

simon_2_1-1595433273216.png

I tried removing the statistics using this code but I am getting an error of:

 

simon_2_2-1595433394057.png

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.JMP" );

dt1 = Logistic( Y( :sex ), X( :height ), By(:age) );

dt1 << journal ();

Report( dt1 )["Iterations"] << delete;
Report( dt1 )["Whole Model Test"] << delete;
Report( dt1 )["Fit Details"] << delete;
Report( dt1 )["Parameter Estimates"] << delete;

 

What am I doing wrong? Thanks for your help.

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to remove summary statistics from Journal using JSL

You need to spend some time reading about Tree Displays in the Scripting Guide.  When an object is moved to a Journal, to reference it, you now have to point to the journal, and then go to the location under the Journal, which will be different than in the Report Output.  See the script below

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );

dt1 = dt << Logistic( Y( :sex ), X( :height ), By( :age ) );

jour = New Window( "The Journal", <<journal );


// The Logistic platform generates a separate brance in the Tree structure
// for each By Group, therefore they each have to be moved
For( i = 1, i <= N Items( dt1 ), i++,
	Report( dt1[i] ) << journal
);

// The Tree Structure is changed once you move the output to the Journal
// It is no longer 5 branches, but is instead one long branch, with 
// multiple Iterations, Whole Model Test, etc.
// Deleting them this way, removes first one, which makes the
// second one now the first, which is deleted during the next
// loop of the For() loop
For( i = 1, i <= N Items( dt1 ), i++,
	Jour["Iterations"] << delete;
	Jour["Whole Model Test"] << delete;
	Jour["Fit Details"] << delete;
	Jour["Parameter Estimates"] << delete;
);
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: How to remove summary statistics from Journal using JSL

You need to spend some time reading about Tree Displays in the Scripting Guide.  When an object is moved to a Journal, to reference it, you now have to point to the journal, and then go to the location under the Journal, which will be different than in the Report Output.  See the script below

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );

dt1 = dt << Logistic( Y( :sex ), X( :height ), By( :age ) );

jour = New Window( "The Journal", <<journal );


// The Logistic platform generates a separate brance in the Tree structure
// for each By Group, therefore they each have to be moved
For( i = 1, i <= N Items( dt1 ), i++,
	Report( dt1[i] ) << journal
);

// The Tree Structure is changed once you move the output to the Journal
// It is no longer 5 branches, but is instead one long branch, with 
// multiple Iterations, Whole Model Test, etc.
// Deleting them this way, removes first one, which makes the
// second one now the first, which is deleted during the next
// loop of the For() loop
For( i = 1, i <= N Items( dt1 ), i++,
	Jour["Iterations"] << delete;
	Jour["Whole Model Test"] << delete;
	Jour["Fit Details"] << delete;
	Jour["Parameter Estimates"] << delete;
);
Jim
simon_2
Level III

Re: How to remove summary statistics from Journal using JSL

Amazing, txnelson. I am now reading about Tree Displays in the Scripting guide.

Thank you.