Hello,
I’ll use Big Class as an example of what Im trying to do. Let’s say I want to plot weight (Y) vs height (X) , using age and sex as BY variables. But in my case, I cannot predict how many levels the BY variables will have. For each bivariate plot, I fit a line. I want to add vertical reference lines at the lower and upper spec limits of “height”, and horizontal reference lines at the lower and upper spec limits of “weight”. I have these spec limit values in columns of my table. Within each combination of age and sex the spec limits are constant (not varying row to row), but the spec limits vary between these combinations. How can I do this in JMP 18?
I thought to make a summary table with all of the values I need.
dt = Data Table( "Big Class" );
rep=Bivariate(
SendToByGroup( Bygroup Default ),
Y( :weight ),
X( :height ),
Fit Line(
{Confid Curves Fit( 1 ), Confid Shaded Fit( 1 ), Line Color( {212, 73, 88} )
}
),
By( :age, :sex ),
);
summary = dt << Summary(
Group( :age, :sex, :LSL_Height,:USL_Height,:LSL_Weight,:USL_Weight ),
Freq( "None" ),
Weight( "None" ),
output table name( "Summary of Big Class grouped by age, sex" )
);
Unfortunately this doesn't work:
for (i=1,i<= n rows(summary), i++,
rep << EVAL(SendToByGroup(
{:age == eval(age[i]), :sex == eval(sex[i])},
SendToReport(
Dispatch( {}, "height", ScaleBox,
{Add Ref Line( eval(LSL_Height[i]), "Solid", "Red", "", 1 ),
Add Ref Line( eval(uSL_Height[i]), "Solid", "Red", "", 1 )
}
)
),
SendToReport(
Dispatch( {}, "Weight", ScaleBox,
{Add Ref Line( eval(LSL_Weight[i]), "Solid", "Black", "", 1 ),
Add Ref Line( eval(uSL_Weight[i]), "Solid", "Black", "", 1 )
}
)
),
);
)
);
Thank you