Here is an example of one way to do this
names default to here(1);
// Open Data Table: big class.jmp
// → Data Table( "big class" )
dt = Open( "/C:/Program Files/SAS/JMPPRO/14/Samples/Data/big class.jmp" );
biv = dt << Bivariate( Y( :Weight ), X( :Height ), invisible );
biv << fit line( {Save Predicteds} );
biv << close window;
// New column: Column 7
Data Table( "big class" ) << New Column( "Upper",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
:Predicted weight + Col Std Dev( :weight )
));
// New column: Column 8
Data Table( "big class" ) << New Column( "lower",
Numeric,
"Continuous",
Format( "Best", 12 ),Formula(
:Predicted weight - Col Std Dev( :weight )
)
);
Graph Builder(
Size( 528, 454 ),
Show Control Panel( 0 ),
Variables(
X( :height ),
Y( :Predicted weight ),
Y( :Upper, Position( 1 ) ),
Y( :lower, Position( 1 ) )
),
Elements(
Points( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 12 ) ),
Smoother( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 13 ) )
)
);
Jim