Subscribe Bookmark RSS Feed

Fit Group and By

Highlighted
vince_faller

Super User

Joined:

Mar 17, 2015

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) )
3 REPLIES
mjoner

Community Trekker

Joined:

Jun 23, 2011

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

Joined:

Mar 17, 2015

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. 

julian

Staff

Joined:

Jun 25, 2014

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