cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
gam1
Level II

Accessing summary of fit when By argument is used

Hi,

 

I make a summary of fit table by using the script:

 
Names Default To Here( 1 );

dt = Data Table("Big Class Data");

biv = dt << Bivariate(
					Y( :weight ),
					X( :height ),
					Fit Line(),
					//By(:sex),
);

rpt = biv << Report;

rpt["Bivariate Fit of weight By height?", "Linear Fit", "Summary of Fit",Table Box( 1 )] << Make Combined Data Table;
 

 However, I don't understand why the same script doesn't work if I apply By (:sex) argument?

 

I get the following massage:

gam1_0-1711633165728.png

Can someone explain what I do wrong and how to fix it?

Thank you in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Accessing summary of fit when By argument is used

When you use By you will get a list of references (you can check this by using Show for example). Depending how you build your search for the reference, you might be able to just change from rpt to rpt[1] which is then single item

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

biv = dt << Bivariate(
	Y(:weight),
	X(:height),
	Fit Line(), 
	By(:sex),
);

rpt = biv << Report;
show(rpt);

rpt[1]["Bivariate Fit of weight By height?", "Linear Fit", "Summary of Fit", Table Box(1)] << Make Combined Data Table;
-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: Accessing summary of fit when By argument is used

When you use By you will get a list of references (you can check this by using Show for example). Depending how you build your search for the reference, you might be able to just change from rpt to rpt[1] which is then single item

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

biv = dt << Bivariate(
	Y(:weight),
	X(:height),
	Fit Line(), 
	By(:sex),
);

rpt = biv << Report;
show(rpt);

rpt[1]["Bivariate Fit of weight By height?", "Linear Fit", "Summary of Fit", Table Box(1)] << Make Combined Data Table;
-Jarmo