cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
vince_faller
Super User (Alumni)

Fit Group and By

Is Fit Group supposed to actually force by graphs inside it to respect by columns?  It seems like the graphs are just being duplicated with a header that says Fit Group age=12, sex=M.  

 

names default to here(1);
dt = open("$SAMPLE_DATA\Big Class.jmp");
fg = dt << Fit Group(
	dt << OneWay( Y( :weight, :height ), X( :name ) ), 
	<<{Arrange in Rows(2)},
	By(:age, :Sex)
); //I like the way this looks but it doesn't seem to actually respect the By in the graphs

//this one respects the by but puts the groupings in each graph which is pretty ugly
//and doesn't arrange in rows
g1 = dt << Oneway( Y( :weight, :height ), X( :name ), By(:age, :Sex) )
Vince Faller - Predictum
1 ACCEPTED SOLUTION

Accepted Solutions
julian
Community Manager Community Manager

Re: Fit Group and By

Hi @vince_faller,

You can include the By statement in both the call to Oneway() and Fit Group() and JMP will arrange the output accordingly. Is this what you were looking for? 

 

names default to here(1);
dt = open("$SAMPLE_DATA\Big Class.jmp");
g2 = dt << Fit Group( Oneway( Y( :weight, :height ), X( :name ), By(:age, :Sex) ), << Arrange in Rows(2), By(:age, :Sex));

Screen Shot 2018-02-01 at 9.33.38 PM.pngYou mentioned that you may have up to 10 By variables, which means the titles on the "Oneway Analysis" outline boxes will get pretty unruly. You could remove them altogether (which will also hide the Red Triangle menu) with the following code: 

( g2 << XPath("//OutlineBox[@helpKey='Oneway Report']") ) << {Set Title( "" )}; 

 

 Screen Shot 2018-02-01 at 10.12.01 PM.png

 

Or, you could rename them all with just a space to retain the red triangle menu but have a cleaner view: 

( g2 << XPath("//OutlineBox[@helpKey='Oneway Report']") ) << {Set Title( " " )};

 

 

Screen Shot 2018-02-01 at 10.07.22 PM.png

 

I hope this helps!

@julian 

View solution in original post

4 REPLIES 4
mjoner
Level VI

Re: Fit Group and By

Are you looking for something closer to this?

 

g2 = dt << Fit Group( Oneway( Y( :weight, :height ), X( :name ), By(:age, :Sex) ), << Arrange in Rows(2));
vince_faller
Super User (Alumni)

Re: Fit Group and By

I've been able to do that.  The problem with that is that the description of the by is on each graph. Also it only creates one fit group.  I'd like to have 1 fit group per by with only the corresponding graphs in it.   I have somewhere north of 10 columns in the by so it gets really ugly.  My real question is, why have fit group even have a by if it doesn't really do anything.  Or I may be missing something. 

Vince Faller - Predictum
julian
Community Manager Community Manager

Re: Fit Group and By

Hi @vince_faller,

You can include the By statement in both the call to Oneway() and Fit Group() and JMP will arrange the output accordingly. Is this what you were looking for? 

 

names default to here(1);
dt = open("$SAMPLE_DATA\Big Class.jmp");
g2 = dt << Fit Group( Oneway( Y( :weight, :height ), X( :name ), By(:age, :Sex) ), << Arrange in Rows(2), By(:age, :Sex));

Screen Shot 2018-02-01 at 9.33.38 PM.pngYou mentioned that you may have up to 10 By variables, which means the titles on the "Oneway Analysis" outline boxes will get pretty unruly. You could remove them altogether (which will also hide the Red Triangle menu) with the following code: 

( g2 << XPath("//OutlineBox[@helpKey='Oneway Report']") ) << {Set Title( "" )}; 

 

 Screen Shot 2018-02-01 at 10.12.01 PM.png

 

Or, you could rename them all with just a space to retain the red triangle menu but have a cleaner view: 

( g2 << XPath("//OutlineBox[@helpKey='Oneway Report']") ) << {Set Title( " " )};

 

 

Screen Shot 2018-02-01 at 10.07.22 PM.png

 

I hope this helps!

@julian 

satellite
Level I

Re: Fit Group and By

In this example, how do we modify the text in the title "Fit Group age=12..." for all the plots?