cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
0 Kudos

Allow Fit Group() to be applied in Fit Y by X with By role for single factors

Currently Fit Y by X platform where a single Y and single X with a By role does not turn on Fit Group. But in JSL, you can wrap the script in Fit Group and it works.

 

Normally in Fit Y by X, when you do multiple X's or multiple Y's, you will get the Fit Group (using Big Class.jmp example file):

Fit Group(
	Oneway(
		Y( :height ),
		X( :age ),
	),
	Oneway(
		Y( :weight ),
		X( :age ),
	)
);

 

If you run Fit Y by X for say two continuous, and a categorical in the By() role, you cannot arrange by rows:

Bivariate(
	Y( :weight ),
	X( :height ),
	By( :age )
);

But using JSL, you can simply wrap it inside the Fit Group and it works:

Fit Group(
    Bivariate(
        Y( :weight ),
        X( :height ),
        By( :age )        
    )
);

 

as does the more general call to Fit Y by X:

Fit Group(
    Fit Y by X(
        Y( :weight ),
        X( :height ),
        By( :age )        
    )
);

Could this be allowed to be the default, or at least allow as a Platform Preference?

 

What is saves to the table or script window looks like this:

Fit Group(
	Bivariate(
		Y( :weight ),
		X( :height ),
		Where( :age == 12 )
	),
	Bivariate(
		Y( :weight ),
		X( :height ),
		Where( :age == 13 )
	),
	Bivariate(
		Y( :weight ),
		X( :height ),
		Where( :age == 14 )
	),
	Bivariate(
		Y( :weight ),
		X( :height ),
		Where( :age == 15 )
	),
	Bivariate(
		Y( :weight ),
		X( :height ),
		Where( :age == 16 )
	),
	Bivariate(
		Y( :weight ),
		X( :height ),
		Where( :age == 17 )
	)
);
5 Comments
SamGardner
Staff
Status changed to: Needs Info

Thanks for the suggestion. 

 

Could you describe the use case a bit more?  In what situations would you want to use the Fit Group when using a By variable?  

 

I see the behavior you are describing, and there is a bit of inconsistency with the saved table script that results from the original script

 

Fit Group(
    Fit Y by X(
        Y( :weight ),
        X( :height ),
        By( :age )        
    )
);

both in the script itself and the output.  I will share this with development.  

Vball247
Level V

An example situation is where a user does a Bivariate analysis to look for linear regression and R-square values, but across say 10 tools, 20 products, 30 process steps, etc. One user wanted to order by "Goodness of Fit", but we were told by JMP Support that the By role made a separate report (a list of "Bivariates") as you see in the output and when saving the script.

But you can actually run the root function of "Fit Y by X()" or "Bivariate()" in a script window to reproduce the analysis. 

Then, by simply wrapping in the "Fit Group", we get the ability to wrap all the bivariates within the menu for Fit Group. So we can get "Arrange by Rows" , "Order by Goodness of Fit", that is only shown when you can get the "Fit Group" window to show. 

Try this example from the football.jmp file

 

Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Football.jmp" );

// Launch platform: Bivariate, only one X and one Y
Data Table( "Football.jmp" ) << Bivariate(
	Y( :Speed ),
	X( :LegPress ),
	By( :Position )
);
// Does not show a Fit Group, but we would like to be able to use the Fit Group
// menu item "Arrange by Rows" instead of showing all vertical in one column

// Launch platform: Bivariate, only one X and one Y, but wrapped in Fit Group() function
Data Table( "Football.jmp" ) << Fit Group(
	Bivariate(
		Y( :Speed ),
		X( :LegPress ),
		By( :Position )
	)
);
// Now shows Fit Group,and you can "Arrange by Rows" like 3, 4, 5, etc. across


// or just add Arrange in Rows as an argument, it works
Data Table( "Football.jmp" ) << Fit Group(
	Bivariate(
		Y( :Speed ),
		X( :LegPress ),
		By( :Position )
	),
	<< {Arrange in Rows(4)}
);


// Launch platform: Fit Group, requires 2 or more X's or Y's
Data Table( "Football.jmp" ) << Bivariate(
	Y( :Height, :Weight ),
	X( :Squat ) 
);
// Note you get this wrapped in "Fit Group" menu

// now add the By role
Data Table( "Football.jmp" ) << Bivariate(
	Y( :Height, :Weight ),
	X( :Squat ),
	By( :Position)
);
// Note you get this wrapped in "Fit Group" menu, but Arrange by Rows does not work well
// for multiple X's and Y's with the By role
SamGardner
Staff

Thank you for the more detail description.  We are tracking this in our list of issues and will look to see if we can improve this in future releases.  

SamGardner
Staff
Status changed to: New
 
Status changed to: Investigating