Recurrence Analysis
Example 1
Summary: Performs a recurrence analysis on the 'Age' variable, with cost and grouping variables specified for treatment groups, and plots MCF differences.
Code:
// Recurrence Analysis
// Open data table
dt = Open("data_table.jmp");
// Recurrence Analysis
Recurrence Analysis(
Y( :Age ),
Cost( :Cost ),
Grouping( :Treatment Group ),
Label( :Patient Number ),
Plot MCF Differences( 1 )
);
Code Explanation:
- Open data table.
- Perform recurrence analysis.
- Set response variable.
- Specify cost variable.
- Define grouping variable.
- Assign label variable.
- Plot MCF differences.
Example 2
Summary: Performs a Recurrence Analysis on the provided data table, using kHours as the time variable, Cost as the cost variable, and System ID as the label. The analysis excludes excluded rows and clears all selections.
Code:
// Recurrence Analysis
// Open data table
dt = Open("data_table.jmp");
// Recurrence Analysis
dt = Current Data Table();
dt << Clear Select;
dt << Select Excluded << Exclude;
dt << Clear Select;
obj =
Recurrence Analysis(
Y( :kHours ),
Cost( :Cost ),
Label( :System ID )
);
Code Explanation:
- Open data table.
- Set current data table.
- Clear all selections.
- Exclude excluded rows.
- Clear all selections again.
- Perform recurrence analysis.
- Set Y variable to kHours.
- Set Cost variable to Cost.
- Set Label variable to System ID.
Example 3
Summary: Performs a recurrence analysis on the provided data table, grouping by 'System ID' and specifying 'kHours' as the Y variable, 'Cost' as the cost variable, and excluding excluded rows.
Code:
// Recurrence Grouped
// Open data table
dt = Open("data_table.jmp");
// Recurrence Grouped
dt = Current Data Table();
dt << Clear Select;
dt << Select Excluded << Exclude;
dt << Clear Select;
obj =
Recurrence Analysis(
Y( :kHours ),
Cost( :Cost ),
Grouping( :System ID ),
Label( :System ID )
);
Code Explanation:
- Open data table.
- Set current data table.
- Clear all selections.
- Exclude excluded rows.
- Clear all selections again.
- Perform recurrence analysis.
- Specify Y variable.
- Specify cost variable.
- Define grouping variable.
- Label by system ID.
Example 4
Summary: Performs a recurrence analysis on the 'Age' variable, considering the 'Cost' and 'EngineID' variables as cost and label respectively, to visualize patterns in reliability data.
Code:
// Recurrence Analysis
// Open data table
dt = Open("data_table.jmp");
// Recurrence Analysis
Recurrence Analysis(
Y( :Age ),
Cost( :Cost ),
Label( :EngineID )
);
Code Explanation:
- Open data table.
- Perform recurrence analysis.
- Set Y variable.
- Set Cost variable.
- Set Label variable.
Example 5
Summary: Performs a survival analysis using time cycles, censor status, and grouping variables to analyze the reliability of blenders.
Code:
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = Recurrence Analysis( Y( :Age ), Cost( :Cost ), Grouping( :Treatment Group ), Label( :Patient Number ) );
Code Explanation:
- Set default names.
- Open data table;
- Perform recurrence analysis.
- Specify Age as response variable.
- Use Cost as cost variable.
- Define Treatment Group for grouping.
- Label patients by number.
Example 6
Summary: Performs a survival analysis using time cycles, censor status, and grouping variables to visualize the reliability of blenders across treatment groups.
Code:
dt under test = Open("data_table.jmp");
obj = Recurrence Analysis(
Age at Event( :Age ),
Label( :Patient Number ),
Name( "End-of-Service" )(:Cost),
Grouping( :Treatment Group ),
MCF Confid Limits( 1 ),
Event Plot( 0 ),
MCF Plot Each Group( 1 ),
SendToReport( Dispatch( {}, "Recurrence Analysis", OutlineBox, {Set Title( "MCF Plot, MCF Confid Limits, MCF Plot Each Group" )} ) )
);
Code Explanation:
- Open data_table data
- Perform Recurrence Analysis.
- Set Age at Event.
- Label by Patient Number.
- Define End-of-Service as Cost.
- Group by Treatment Group.
- Enable MCF Confidence Limits.
- Disable Event Plot.
- Enable MCF Plot for each group.
- Set report title.
Example 7
Summary: Performs a survival analysis using time cycles, censor status, and grouping variables to analyze the reliability of blenders.
Code:
dt under test = Open("data_table.jmp");
obj = Recurrence Analysis( Y( :Age ), Cost( :Cost ), Grouping( :Treatment Group ), Label( :Patient Number ), Plot MCF Differences( 1 ) );
Code Explanation:
- Open data table;
- Perform Recurrence Analysis.
- Set Y variable to Age.
- Set Cost variable to Cost.
- Set Grouping variable to Treatment Group.
- Set Label variable to Patient Number.
- Plot MCF Differences.
Example 8
Summary: Performs a survival analysis using time cycles, censor status, and grouping variables to analyze the reliability of blenders.
Code:
Open("data_table.jmp");
ra = Recurrence Analysis( Y( :Age ), Label( :EngineID ), Cost( :Cost ), Event Plot( 1 ), Report View( "Summary" ) );
Code Explanation:
- Open data table.
- Perform recurrence analysis.
- Set response variable.
- Define label variable.
- Specify cost variable.
- Enable event plot.
- Set report view to summary.
Example 9
Summary: Runs a recurrence analysis to identify patterns in the Age variable, while considering cost and treatment group as covariates, and visualizing the results with an event plot.
Code:
Open("data_table.jmp");
ra = Recurrence Analysis( Y( :Age ), Label( :EngineID ), Cost( :Cost ), Event Plot( 1 ), Report View( "Summary" ) );
(ra << Report) << Set Window Size( 800, 800 );
Code Explanation:
- Open data table;
- Perform recurrence analysis.
- Set response variable.
- Define label variable.
- Specify cost variable.
- Enable event plot.
- Select summary report view.
- Retrieve analysis report.
- Set window size to 800x800.
Example 10
Summary: Performs a survival analysis using time cycles, censor status, and grouping variables by performing Recurrence Analysis on the 'Age' column, filtering data locally, and generating reports.
Code:
dt = Open("data_table.jmp");
obj = Recurrence Analysis( Y( :Age ), Cost( :Cost ), Label( :EngineID ), );
obj << Local Data Filter( Add Filter( columns( :Age ), Where( :Age >= 200 & :Age <= 650 ) ), Mode( Select( 0 ), Show( 1 ), Include( 1 ) ) );
obj << Automatic Recalc( 1 );
dt << Select Where( :EngineID >= 400 );
dt << Exclude();
rpt = Report( obj );
Close( dt, NoSave );
dt = Open("data_table.jmp");
obj = Recurrence Analysis(
Y( :Age ),
Cost( :Cost ),
Label( :EngineID ),
Local Data Filter( Add Filter( columns( :Age ), Where( :Age >= 200 & :Age <= 650 ) ), Mode( Select( 0 ), Show( 1 ), Include( 1 ) ) ),
);
obj << Automatic Recalc( 0 );
dt << Select Where( :EngineID >= 400 );
dt << Exclude();
rpt = Report( obj );
Code Explanation:
- Open data table;
- Perform Recurrence Analysis.
- Add local data filter for Age.
- Enable automatic recalculation.
- Select rows where EngineID >= 400.
- Exclude selected rows.
- Generate report from analysis.
- Close table without saving.
- Reopen table "data_table.jmp".
- Perform Recurrence Analysis with local data filter.
- Disable automatic recalculation.
- Select rows where EngineID >= 400.
- Exclude selected rows.
- Generate report from analysis.
Example 11
Summary: Performs a survival analysis using time cycles, censor status, and grouping variables to generate reports for Placebo, Pyridoxine, and Thiotepa treatment groups.
Code:
dt = Open("data_table.jmp");
obj = dt << Recurrence Analysis( Y( :Age ), Cost( :Cost ), By( :Treatment Group ), Label( :Patient Number ), );
rpt = obj << report;
placeboTbl = rpt[1][Outline Box( "MCF" )][Table Box( 1 )] << get as matrix;
pyridoxineTbl = rpt[2][Outline Box( "MCF" )][Table Box( 1 )] << get as matrix;
thiotepaTbl = rpt[3][Outline Box( "MCF" )][Table Box( 1 )] << get as matrix;
nRowPlacebo = N Rows( placeboTbl );
nRowPyridoxine = N Rows( pyridoxineTbl );
nRowThiotepa = N Rows( thiotepaTbl );
placeboTblObj = rpt[1][Outline Box( "MCF" )][Table Box( 1 )];
dt1 = placeboTblObj << Make Combined Data Table;
Code Explanation:
- Open data table;
- Perform Recurrence Analysis.
- Retrieve report object.
- Extract MCF table for Placebo.
- Extract MCF table for Pyridoxine.
- Extract MCF table for Thiotepa.
- Count rows in Placebo table.
- Count rows in Pyridoxine table.
- Count rows in Thiotepa table.
- Create combined data table from Placebo table.
Example 12
Summary: Performs a survival analysis using time cycles, censor status, and grouping variables by performing a Recurrence Analysis on the Age variable, cost calculation, and plotting MCF differences.
Code:
Open("data_table.jmp");
plat = Recurrence Analysis( Y( :Age ), Cost( :Cost ), Grouping( :Treatment Group ), Label( :Patient Number ), Plot MCF Differences( 1 ) );
rep = Report( plat );
title = rep[Outline Box( 2 )] << GetTitle;
Code Explanation:
- Open data table;
- Perform recurrence analysis.
- Set Y variable as Age.
- Set Cost variable.
- Group by Treatment Group.
- Label by Patient Number.
- Plot MCF differences.
- Generate report object.
- Access second outline box.
- Retrieve title text.
Recurrence Analysis using For
Summary: Generates a recurrence analysis report for a specified data table, utilizing the Recurrence Analysis platform to identify patterns and trends.
Code:
For( i = 1, i < 99, i++,
dt = Open("data_table.jmp");
obj = dt << Recurrence Analysis( Age at Event( :Age ), Label( :EngineID ), Name( "End-of-Service" )(:Cost), );
rpt = Report( obj )["Recurrence Analysis"] << get scriptable object;
rpt << Fit Model;
rpt = obj << report;
rpt[Button Box( 9 )] << Click;
Close( dt, no save );
);
Code Explanation:
- Loop from 1 to 98.
- Open data table.
- Perform recurrence analysis.
- Get report object.
- Fit model within report.
- Update report object.
- Click button box 9.
- Close data table without saving.
- Repeat loop.
Recurrence Analysis using Value Labels
Summary: Analyze a data table by performing recurrence analysis, grouping by Treatment Group, and saving MCF differences to a new table.
Code:
dt = Open("data_table.jmp");
dt:Treatment Group << Value Labels( {1 = "Placebo", 2 = "Pyridoxine", 3 = "Thiotepa", 4 = "Nonexistent"} ) << Use Value Labels( 1 ) <<
Set Property( "Forced Values", {1, 2, 3, 4} );
obj = dt << Recurrence Analysis( Y( :Age ), Cost( :Cost ), Grouping( :Treatment Group ), Label( :Patient Number ), Event Plot( 0 ) );
dt1 = obj << Save MCF Differences( Last );
Code Explanation:
- Open data table;
- Set value labels for Treatment Group.
- Enable value labels usage.
- Define forced values for Treatment Group.
- Perform recurrence analysis.
- Specify Age as Y variable.
- Specify Cost as cost variable.
- Group by Treatment Group.
- Label by Patient Number.
- Save MCF differences to new table.
Recurrence Analysis using Run Script
Summary: Extracts and analyzes data tables for placebo, pyridoxine, and thiotepa treatments using Recurrence Analysis script in JMP.
Code:
dt = Open("data_table.jmp");
obj = dt << Run Script( "Recurrence Analysis" );
rpt = obj << report;
placeboTbl = rpt[Outline Box( "Placebo" )][Table Box( 1 )] << get as matrix;
pyridoxineTbl = rpt[Outline Box( "Pyridoxine" )][Table Box( 1 )] << get as matrix;
thiotepaTbl = rpt[Outline Box( "Thiotepa" )][Table Box( 1 )] << get as matrix;
nRowPlacebo = N Rows( placeboTbl );
nRowPyridoxine = N Rows( pyridoxineTbl );
nRowThiotepa = N Rows( thiotepaTbl );
placeboTblObj = rpt[Outline Box( "Placebo" )][Table Box( 1 )];
dt1 = placeboTblObj << Make Combined Data Table;
dt = Open("data_table.jmp");
obj = dt << Recurrence Analysis( Y( :Age ), Cost( :Cost ), By( :Treatment Group ), Label( :Patient Number ), );
rpt = obj << report;
placeboTbl = rpt[1][Outline Box( "MCF" )][Table Box( 1 )] << get as matrix;
pyridoxineTbl = rpt[2][Outline Box( "MCF" )][Table Box( 1 )] << get as matrix;
thiotepaTbl = rpt[3][Outline Box( "MCF" )][Table Box( 1 )] << get as matrix;
nRowPlacebo = N Rows( placeboTbl );
nRowPyridoxine = N Rows( pyridoxineTbl );
nRowThiotepa = N Rows( thiotepaTbl );
placeboTblObj = rpt[1][Outline Box( "MCF" )][Table Box( 1 )];
dt1 = placeboTblObj << Make Combined Data Table;
Code Explanation:
- Open data table;
- Run "Recurrence Analysis" script.
- Extract Placebo table.
- Extract Pyridoxine table.
- Extract Thiotepa table.
- Count rows in Placebo table.
- Count rows in Pyridoxine table.
- Count rows in Thiotepa table.
- Create combined data table from Placebo.
- Repeat analysis and extract tables again.
Recurrence Analysis using Log Capture
Summary: Analyze and visualize end-of-service events by performing recurrence analysis, grouping by system ID, and generating an event plot.
Code:
dt = Open("data_table.jmp");
Log Capture(
obj = dt << Recurrence Analysis(
Age at Event( :kHours ),
Label( :System ID ),
Name( "End-of-Service" )(:Cost),
Grouping( :System ID ),
Event Plot( 1 )
)
);
rpt = obj << report;
jrn = rpt[Outline Box( "Event Plot" )][FrameBox( 1 )] << get journal;
Code Explanation:
- Open data table.
- Perform recurrence analysis.
- Set age at event.
- Label system ID.
- Define end-of-service cost.
- Group by system ID.
- Enable event plot.
- Capture log output.
- Retrieve report object.
- Extract event plot journal.