Current Report
Current Report using Fit Y by X
Summary: Runs data analysis by opening a data table, running the 'Set Age Value Labels' script, fitting height by age regression, saving the report to OW.jrn, and closing the dataset without saving.
Code:
dt = Open("data_table.jmp");
dt << run script( "Set Age Value Labels" );
dt << Fit Y by X( Y( :height ), X( :age ) );
Current Report() << save journal( "$TEMP\OW.jrn" );
dt << close window( "No Save" );
Code Explanation:
- Open data table;
- Run "Set Age Value Labels" script.
- Fit height by age regression.
- Save report to OW.jrn.
- Close dataset without saving.
Current Report using Run Script
Example 1
Summary: Executes a SEM: Multiple Group Analysis LGC script, allowing for interactive selection of tabs and diagram properties.
Code:
dt = Open("data_table.jmp");
obj = dt << Run Script( "SEM: Multiple Group Analysis LGC" );
rpt = Current Report();
rpt[TabListBox( 1 )] << SetSelected( 2 );
rpt[TabListBox( 1 )] << SetSelected( 1 );
Code Explanation:
- Open data table;
- Run SEM: Multiple Group Analysis LGC script.
- Get current report.
- Select second tab.
- Select first tab.
Example 2
Summary: Executes Multiple Factor Analysis on a data table, enabling automatic recalculation and setting a specific value for Carolyn Tannic.
Code:
dt = Open("data_table.jmp");
mfa = dt << Run Script( "Multiple Factor Analysis" );
mfa << Automatic Recalc( 1 );
:Carolyn Tannic[Where( :Region == "Sonoma" )] = 1000;
Wait( 0 );
rpt = Current Report();
eigen_jmp = rpt["Summary Plots", Table Box( 1 )] << get as matrix();
Code Explanation:
- Open data_table data
- Run Multiple Factor Analysis.
- Enable automatic recalculation.
- Set Carolyn Tannic value.
- Wait for script completion.
- Get current report.
- Extract Summary Plots table.
- Convert table to matrix.
Example 3
Summary: Compares selected models in a SEM: Measurement Models script, generating a report with a Chi-Square Difference Test outline box and retrieving its XML results.
Code:
dt = Open("data_table.jmp");
obj = dt << Run Script( "SEM: Measurement Models" );
rpt = Current Report();
For( i = 1, i <= 2, i++,
(obj << Report())[Outline Box( "Model Comparison" )][Table Box( 1 )] << Set Selected
Rows( [3, 4] );
obj << Compare Selected Models();
);
results_box = (rpt[Outline Box( "Chi-Square Difference Test" )]);
results_box << get xml;
Code Explanation:
- Open data table;
- Run SEM: Measurement Models script.
- Get current report.
- Loop 2 times.
- Select rows 3 and 4 in Model Comparison table.
- Compare selected models.
- Get Chi-Square Difference Test outline box.
- Retrieve XML of results.
Example 4
Summary: Compares growth trajectories in a data table by running a SEM script, setting model independence, and extracting relevant text from the report.
Code:
dt = Open("data_table.jmp");
obj = dt << Run Script( "SEM: Compare Growth Trajectories" );
rpt = Current Report();
obj << Set as Independence Model( 5 );
text = rpt["Model Comparison", Text Box( 1 )] << get text();
Code Explanation:
- Open data table;
- Run SEM script.
- Retrieve current report.
- Set model independence.
- Extract text from report.