dt = As Table( (0 :: 10)`, << Column Names( {"X"} ) );
// create X variable
Random Reset( 12345 );
// set initial random seed to get reproducible results
dt << New Column( "Y",
	"Continuous",
	"Numeric",
	Set Formula( :X * 2 + 1 + Random Normal() )
);
// Y values have a random component
res = []; // define results matrix (empty to start)
For( i = 1, i <= 100, i++,
// loop through simulation runs
	// for each iteration, fit a regression line and save parameter estimates
	bv = dt << Bivariate( Y( :Y ), X( :X ), Fit Line( 1 ), Invisible );
	res |/= (Report( bv )["Parameter Estimates"][
	Number Col Box( "Estimate" )] << Get as Matrix)`;
	// concatenate the results to the bottom of the results matrix
	bv << Close Window;
	// close the window (even though it’s invisible)
	dt:Y << Eval Formula;
	// generate new Y values
);
dtres = As Table( res, << Column Names( {"Intercept", "Slope"} ) );
// create table of results
dtres << Distribution( Y( :Intercept, :Slope ) );
// show results in Distribution
If you want to run an analysis as an intermediate step in your script, and do not need the user to see the analysis, hide it with the invisible option. In this case, you might want to show only specific results from the report, which you can output to a journal or to the log.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dist = dt << Distribution( Y( :height ), CDF Plot( 1 ), invisible );
Report( dist )["CDF Plot"] << Journal;
dist << Close Window;
The following example extracts the F-Ratio from an invisible Bivariate report, and outputs it to the log:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( x( :height ), y( :weight ), invisible );
biv << Fit Line;
r = biv << Report;
fratio = r[ColumnBox( "F Ratio" )][1];
r << Close Window;
Show( fratio );
fratio = 1.15609545178219;
You can also use the invisible option on the options in the Tables menu, such as Subset, Sort, Stack, and so on. The following example makes the Subset operation invisible:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Select Where( :age == 14 );
subDt = dt << Subset( invisible );
subDt << Bivariate( x( :height ), y( :weight ), Fit Line );
subDt << Bivariate( x( :height ),y( :weight ), Where( :age == 14 ), Fit Line );

Help created on 7/12/2018