Response Screening
Example 1
Summary: Generates a contour profiler plot for yield with Reaction Temperature and Reaction Time as factors, utilizing the Response Screening platform in JMP.
Code:
// Response Screening
// Open data table
dt = Open("data_table.jmp");
// Response Screening
Response Screening(
Y(
:log2in_TMS1, :log2in_CG4847,
:log2in_Adh, :log2in_CG18178,
:log2in_CG12744,
:log2in_alpha_Man_II,
:log2in_Arc105, :log2in_CG8818,
:log2in_Ptpa, :log2in_CG1965,
:log2in_BcDNA_GH06348,
:log2in_CG8336, :log2in_RpS3,
:log2in_CG10992, :log2in_CG3700,
:log2in_CG3223, :log2in_CG8701,
:log2in_EG_BACN32G11_6,
:log2in_CG8965, :log2in_Tsp42Ej,
:log2in_CG6210, :log2in_CG3301,
:log2in_Rel, :log2in_CG5063,
:log2in_CG8445,
:log2in_BcDNA_GH04120,
:log2in_CG17259,
:log2in_BcDNA_GH04802,
:log2in_CG9547,
:log2in_BcDNA_GH06717,
:log2in_CG5567, :log2in_CG5538,
:log2in_BcDNA_GH07188,
:log2in_BEST_CK00246, :log2in_Tpi,
:log2in_CG8040, :log2in_Dredd,
:log2in_MIP, :log2in_PpD3,
:log2in_CG1345, :log2in_CG6251,
:log2in_cenB1A, :log2in_CG6306,
:log2in_CG6372, :log2in_CG4995,
:log2in_CG2493, :log2in_CG3045,
:log2in_CG12239, :log2in_CG10115,
:log2in_CG10675, :log2in_CG3570,
:log2in_CG7888, :log2in_CG8547,
:log2in_CG7761, :log2in_CG8134,
:log2in_CG1937,
:log2in_TfIIEalpha,
:log2in_CG10487, :log2in_Rab_RP4,
:log2in_CG1839, :log2in_CG8503,
:log2in_E2f2, :log2in_snapin,
:log2in_CG9584, :log2in_CG10563,
:log2in_Pglym78,
:log2in_BcDNA_GH13356,
:log2in_CG8286, :log2in_CG5222,
:log2in_CG4785, :log2in_alpha_Cat,
:log2in_CG9797, :log2in_CG17711,
:log2in_tef, :log2in_CG3430,
:log2in_BcDNA_LD32788,
:log2in_CG15893, :log2in_nop5,
:log2in_BEST_LD08487,
:log2in_CG6563, :log2in_CG17401,
:log2in_CG11490, :log2in_CG8237,
:log2in_CG6005, :log2in_CG4364,
:log2in_CG4968, :log2in_CG10733,
:log2in_CG3409, :log2in_Mat89Bb,
:log2in_CG18551, :log2in_elav,
:log2in_mei_S332, :log2in_CG4351,
:log2in_ProsMA5, :log2in_CG6239,
:log2in_CG17292, :log2in_CG13796,
:log2in_HLHmbeta, :log2in_CG6783,
:log2in_CG11317
),
X( :line )
);
Code Explanation:
- Open table.
- Set response variables.
- Set predictor variable.
- Run Response Screening.
Example 2
Summary: Process of response screening and data manipulation, including column selection, deletion, and p-value saving, to prepare a dataset for further analysis.
Code:
dt = Open("data_table.jmp");
rs = dt << Response Screening( Y( 8 :: 394 ), X( :Process ), MaxLogWorth( 100 ) );
Column( dt, 12 ) << Set Selected( 1 );
dt << Delete Columns;
rs << Save PValues;
dt2 = Data Table("data_table");
dt2 << Select Rows( 1 :: 10 );
Log Capture( rs << Fit Selected Items );
rs << close window;
Code Explanation:
- Open data table.
- Perform response screening.
- Select column for deletion.
- Delete selected columns.
- Save p-values to new table.
- Open p-values table.
- Select first ten rows.
- Capture log output.
- Fit selected items.
- Close response screening window.
Example 3
Summary: Runs a Response Screening analysis to identify correlations between Job Satisfaction and demographic factors, including Employee Tenure, Position Tenure, and Age Group.
Code:
dt = Open("data_table.jmp");
obj = Response Screening(
Y( :Job Satisfaction ),
X( :Employee Tenure, :Position Tenure, :Age Group ),
PValues Table on Launch( 0 ),
Corr( 1 )
);
rpt = Report( obj );
corr = rpt[Outline Box( "Response Screening" )][Number Col Box( "Corr" )] << get as matrix;
fdr lw by corr = (rpt[Outline Box( "Response Screening" )][FrameBox( 3 )] << Find Seg( Marker Seg( 1 ) )) << Get X values;
Code Explanation:
- Open data table.
- Run Response Screening analysis.
- Set Y variable to Job Satisfaction.
- Set X variables to Employee Tenure, Position Tenure, Age Group.
- Disable PValues Table on launch.
- Enable correlation display.
- Retrieve report object.
- Extract correlation matrix.
- Locate FDR plot.
- Extract FDR lower bound values.
Example 4
Summary: Runs response screening and report generation, extracting Kappa value and FDR plot X values from a JMP data table.
Code:
dt = Open("data_table.jmp");
obj = Response Screening( X( :From ), Y( :To ), Kappa( 1 ) );
rpt = Report( obj );
Kappa = rpt[Outline Box( "Response Screening" )][Number Col Box( "Kappa" )] << Get as matrix;
fdr lw by kappa = (rpt[Outline Box( "Response Screening" )][FrameBox( 3 )] << Find Seg( Marker Seg( 1 ) )) << Get X values;
Code Explanation:
- Open data table.
- Perform response screening.
- Extract report object.
- Retrieve Kappa value.
- Locate FDR plot.
- Identify marker segment.
- Extract X values.
Example 5
Summary: Creates a response screening object with specified Y and X variables, customizing the report layout and visibility of columns.
Code:
Open("data_table.jmp");
obj = Response Screening(
Y( Column Group( "Markers" ) ),
X( :Sex, :Disease Status ),
PValues Table on Launch( 0 ),
Common Y Scale( 1 ),
SendToReport(
Dispatch( {}, "", TabListBox, {Set Selected( 4 )} ),
Dispatch( {}, "", TabPageBox, {Title( "FDR PValue Plot" )} ),
Dispatch( {}, "", TabListBox( 2 ), {Set Selected( 2 )} ),
Dispatch( {}, "Diff FDR L95", NumberColBox, {Visibility( "Visible" )} ),
Dispatch( {}, "Diff FDR U95", NumberColBox, {Visibility( "Visible" )} )
)
);
means = obj << Save Means Differences;
L95_MD = means[0, N Col( means ) - 2];
U95_MD = means[0, N Col( means ) - 1];
Code Explanation:
- Open data table;
- Create response screening object.
- Set Y variables from "Markers".
- Set X variables: Sex, Disease Status.
- Disable PValues Table on launch.
- Enable common Y scale.
- Select fourth tab in report.
- Rename tab to "FDR PValue Plot".
- Select second tab in report.
- Show Diff FDR L95 and U95 columns.
Example 6
Summary: Analyze a data table by opening it, launching Response Screening, and generating a report with X Baseline values.
Code:
dt = Open("data_table.jmp");
obj = dt << Response Screening( X( :Age Group ), Y( :Single Status, :Gender, :I am working on my career ) );
rpt = Report( obj );
BaselineNoCont = rpt[Tab Page Box( 4 ), String Col Box( "X Baseline" )][1, 1];
Code Explanation:
- Open data table.
- Launch Response Screening platform.
- Set Age Group as predictor.
- Set Single Status, Gender, I am working on my career as responses.
- Generate report object.
- Navigate to fourth tab page.
- Access X Baseline column box.
- Extract first row value.
- Assign value to BaselineNoCont variable.
Example 7
Summary: Response Screening platform to visualize and analyze data, setting response variable, predictor variables, grouping variable, and enabling common Y scale.
Code:
dt = Open("data_table.jmp");
obj = dt << Response Screening(
Y( :height ),
X( :age ),
Grouping( :sex ),
Common Y Scale( 1 ),
SendToReport(
Dispatch( {}, "", TabListBox( 2 ), {Set Selected( 2 )} ),
Dispatch( {}, "Difference L95", NumberColBox, {Visibility( "Visible" )} ),
Dispatch( {}, "Difference U95", NumberColBox, {Visibility( "Visible" )} ),
Dispatch( {}, "Diff FDR L95", NumberColBox, {Visibility( "Visible" )} ),
Dispatch( {}, "Diff FDR U95", NumberColBox, {Visibility( "Visible" )} )
)
);
Code Explanation:
- Open data table.
- Launch Response Screening platform.
- Set response variable.
- Set predictor variable.
- Apply grouping variable.
- Enable common Y scale.
- Select second tab.
- Show Difference L95 column.
- Show Difference U95 column.
- Show Diff FDR L95 column.
- Show Diff FDR U95 column.
Example 8
Summary: Process of response screening for a data table, utilizing Response Screening platform to set up predictor and response variables.
Code:
dt = Open("data_table.jmp");
obj = dt << Response Screening( Y( :Sepal length ), X( :Petal length ), PValues Table on Launch( 0 ) );
Code Explanation:
- Open data table;
- Launch Response Screening.
- Set response variable.
- Set predictor variable.
- Disable PValues Table on launch.
Example 9
Summary: Process of performing Response Screening with Sepal length as response and Species as predictor, then repeats the process with Petal length as predictor.
Code:
dt = Open("data_table.jmp");
obj = dt << Response Screening( Y( :Sepal length ), X( :Species ), PValues Table on Launch( 0 ) );
errormsg1 = Log Capture( obj << Show Means Differences );
Close( dt, nosave );
dt = Open("data_table.jmp");
obj = dt << Response Screening( Y( :Sepal length ), X( :Petal length ), PValues Table on Launch( 0 ) );
Code Explanation:
- Open data table;
- Perform Response Screening.
- Set Sepal length as response.
- Set Species as predictor.
- Disable PValues Table on Launch.
- Capture error messages.
- Close dataset without saving.
- Reopen data_table dataset
- Perform Response Screening again.
- Set Sepal length as response.
- Set Petal length as predictor.
- Disable PValues Table on Launch.
Example 10
Summary: Runs a Response Screening analysis to identify relationships between height and weight, grouped by age, with missing values treated as category.
Code:
dt = Open("data_table.jmp");
:age[35 :: 40] = .;
obj = dt << Response Screening( Y( :height ), X( :weight ), Grouping( :age ), Missing is Category( 1 ) );
rpt1 = Report( obj );
Code Explanation:
- Open data table;
- Set age values 35-40 to missing.
- Run Response Screening analysis.
- Set height as response variable.
- Set weight as predictor variable.
- Use age as grouping variable.
- Treat missing values as category.
- Generate report object.
- Assign report to rpt1 variable.
Example 11
Summary: Runs response screening analysis to identify significant traits and markers, generating a contour profiler plot for yield with Reaction Temperature and Reaction Time as factors.
Code:
dt = Open("data_table.jmp");
obj = dt << Response Screening(
Y( :Trait1, :Trait2, :Trait3, :Trait4 ),
X( Column Group( "Markers" ) ),
PValues Table on Launch( 0 ),
Common Y Scale( 1 ),
Common X Scale( 1 ),
Volcano Plots Use FDR Axis( 1 ),
);
dt2 = obj << Save PValues;
fdrlogworth = (dt2 << get as matrix)[0, 5];
Code Explanation:
- Open data table.
- Perform response screening analysis.
- Specify traits as responses.
- Group markers as predictors.
- Disable PValues table on launch.
- Enable common Y scale.
- Enable common X scale.
- Use FDR axis in volcano plots.
- Save PValues to new table.
- Extract FDR logworth value.
Example 12
Summary: Response Screening analysis for a data table, setting Trait1-4 as response variables and Father, Mother, Sex, Disease Status as predictors, with options to customize common Y and X scales, PValues Table, and Volcano Plots.
Code:
dt = Open("data_table.jmp");
obj = dt << Response Screening(
Y( :Trait1, :Trait2, :Trait3, :Trait4 ),
X( :Father, :Mother, :Sex, :Disease Status ),
PValues Table on Launch( 0 ),
Common Y Scale( 1 ),
Common X Scale( 1 ),
Volcano Plots Use FDR Axis( 1 ),
);
dt2 = obj << Save PValues;
fdrlogworth = (dt2 << get as matrix)[0, 5];
Code Explanation:
- Open data_table data
- Initiate Response Screening analysis.
- Set Trait1-4 as response variables.
- Set Father, Mother, Sex, Disease Status as predictors.
- Disable PValues Table on launch.
- Enable common Y scale.
- Enable common X scale.
- Use FDR axis for volcano plots.
- Save PValues to new table.
- Extract FDR logworth value.
Example 13
Summary: Response Screening analysis to visualize yield with Reaction Temperature and Reaction Time as factors, utilizing a pre-defined data table.
Code:
dt = Open("data_table.jmp");
obj = dt << Response Screening(
Y( Column Group( "Markers" ) ),
X( :Sex, :Disease Status ),
Common Y Scale( 1 ),
Show Means Differences( 1 ),
SendToReport( Dispatch( {}, "", TabListBox, {Set Selected( 4 )} ), Dispatch( {}, "", TabListBox( 2 ), {Set Selected( 2 )} ) )
);
obj << Relaunch Analysis;
win = Window( "Response Screening" );
defmaxlevels = win[Number Edit Box( 2 )] << get;
Code Explanation:
- Open data table.
- Launch Response Screening.
- Set Y variables.
- Set X variables.
- Enable common Y scale.
- Show means differences.
- Select specific tabs.
- Relaunch analysis.
- Access Response Screening window.
- Get max levels value.
Response Screening using Associative Array
Example 1
Summary: Runs response screening analysis by creating an associative array, performing the analysis, and extracting relevant data tables.
Code:
Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = Response Screening( Y( Column Group( "Responses" ) ), X( :Process ), PValues Table on Launch( 1 ) );
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
)
);
Code Explanation:
- Open data table;
- Create associative array before action.
- Perform response screening analysis.
- Create associative array after action.
- Remove initial items from associative array.
- Get keys from associative array.
- Loop through keys.
- Check if key contains "PValues".
- Assign matching data table to variable.
- End loop.
Example 2
Summary: Process of launching a response screening analysis, capturing window titles before and after the analysis, and extracting data tables from the resulting PValues table.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = Response Screening( Y( Column Group( "Responses" ) ), X( :Process ), Robust( 1 ), MaxLogWorth( 1000 ), PValues Table on Launch( 1 ) );
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
)
);
Code Explanation:
- Open data table.
- Create associative array before analysis.
- Launch response screening analysis.
- Create associative array after analysis.
- Remove common windows from associative arrays.
- Get keys from associative array.
- Loop through keys.
- Check for "PValues" in key.
- Assign matching data table to variable.
- End loop.
Example 3
Summary: Runs the response screening analysis process, generating PValues and Means tables from a data table, while also capturing window titles before and after analysis.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = Response Screening( Y( Column Group( "Responses" ) ), X( :Process ), PValues Table on Launch( 1 ) );
obj << Save Means;
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
);
If( Contains( aftlst[i], "Means" ),
dt3 = Data Table( aftlst[i] )
);
);
Close( dt, no save );
Code Explanation:
- Open data table;
- Create associative array before analysis.
- Run response screening analysis.
- Save means from analysis.
- Create associative array after analysis.
- Remove original window titles.
- Get list of new window titles.
- Loop through new window titles.
- Identify and assign PValues table.
- Identify and assign Means table.
- Close original data table without saving.
Example 4
Summary: Response Screening analysis and saves means differences, utilizing Associative Arrays to track window titles and data table keys.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = Response Screening( Y( Column Group( "Responses" ) ), X( :Process ), PValues Table on Launch( 1 ) );
obj << Save Means Differences;
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
);
If( Contains( aftlst[i], "Means Differences" ),
dt3 = Data Table( aftlst[i] )
);
);
Close( dt, no save );
Code Explanation:
- Open data table;
- Store initial window titles.
- Perform Response Screening analysis.
- Save means differences.
- Store updated window titles.
- Remove initial titles from updated list.
- Get remaining window keys.
- Loop through window keys.
- Identify "PValues" table.
- Identify "Means Differences" table.
- Close original table without saving.
Example 5
Summary: Response Screening analysis and saves means differences, while also identifying and extracting specific tables from the output.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = Response Screening(
Y( Column Group( "Responses" ) ),
X( :Process ),
Practical Difference Portion( 0.15 ),
PValues Table on Launch( 1 )
);
obj << Save Means Differences;
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
);
If( Contains( aftlst[i], "Means Differences" ),
dt3 = Data Table( aftlst[i] )
);
);
Close( dt, no save );
Code Explanation:
- Open data table.
- Create associative array of current windows.
- Run Response Screening analysis.
- Save means differences.
- Create new associative array of current windows.
- Remove initial windows from new array.
- Get keys of remaining windows.
- Loop through window keys.
- Identify "PValues" table.
- Identify "Means Differences" table.
- Close original data table without saving.
Example 6
Summary: Response Screening analysis and extracts relevant data tables from the output, utilizing associative arrays to manage window states.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = Response Screening( Y( Column Group( "Responses" ) ), X( :Process ), MaxLogWorth( 1000 ), PValues Table on Launch( 1 ) );
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
)
);
Code Explanation:
- Open data table;
- Store current windows in associative array.
- Perform Response Screening analysis.
- Store updated windows in associative array.
- Remove initial windows from updated array.
- Get keys of remaining windows.
- Loop through remaining windows.
- Check for window containing "PValues".
- Assign matching data table to dt2.
- End loop.
Example 7
Summary: Runs response screening analysis and saves means, utilizing associative arrays to manage window titles and data tables.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = Response Screening( Y( Column Group( "Responses" ) ), X( :Process ), PValues Table on Launch( 1 ) );
obj << Save Means;
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
);
If( Contains( aftlst[i], "Means" ),
dt3 = Data Table( aftlst[i] )
);
);
Code Explanation:
- Open data table.
- Create associative array before analysis.
- Perform response screening analysis.
- Save means from analysis.
- Create associative array after analysis.
- Remove windows from before array.
- Get keys from after array.
- Loop through keys in after array.
- Identify PValues table.
- Identify Means table.
Example 8
Summary: Processes and analyzes data table responses, generating separate data tables for PValues and Means Differences.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = Response Screening( Y( Column Group( "Responses" ) ), X( :Process ), PValues Table on Launch( 1 ) );
obj << Save Means Differences;
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
);
If( Contains( aftlst[i], "Means Differences" ),
dt3 = Data Table( aftlst[i] )
);
);
Code Explanation:
- Open data table;
- Create associative array of windows.
- Run Response Screening analysis.
- Save means differences.
- Create new associative array of windows.
- Remove previous window titles from new array.
- Get keys from new associative array.
- Loop through each key in array.
- Check if key contains "PValues".
- Assign matching data table to dt2.
Example 9
Summary: Runs response screening analysis and saves means differences in a JMP data table, utilizing associative arrays to manage window titles and data tables.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = Response Screening(
Y( Column Group( "Responses" ) ),
X( :Process ),
Practical Difference Portion( 0.15 ),
PValues Table on Launch( 1 )
);
obj << Save Means Differences;
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
);
If( Contains( aftlst[i], "Means Differences" ),
dt3 = Data Table( aftlst[i] )
);
);
Code Explanation:
- Open data table;
- Create associative array before analysis.
- Perform response screening analysis.
- Save means differences.
- Create associative array after analysis.
- Remove initial windows from associative array.
- Get keys from associative array.
- Loop through keys.
- Identify PValues table.
- Identify Means Differences table.
Example 10
Summary: Process of response screening, saving p-values, and extracting data tables from a JMP script.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
test = Is Scriptable( obj = Response Screening( Y( :Height, :Weight ), X( :Age, :Sex ) ) );
obj << Save PValues;
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
)
);
Code Explanation:
- Open data table;
- Create associative array of windows.
- Perform response screening.
- Save p-values from analysis.
- Create associative array of windows again.
- Remove original windows from new array.
- Get keys from updated array.
- Loop through keys in array.
- Check if key contains "PValues".
- Assign matching data table to dt2.
Example 11
Summary: Runs data table operations to prepare for Response Screening analysis, including locking the data table and capturing log information.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
dt << Lock Data Table( 1 );
LC = Log Capture(
obj = dt << Response Screening(
Y( :log2in_TMS1, :log2in_CG4847, :log2in_Adh ),
X( :line ),
save outlier indicator,
save std residuals
)
);
Code Explanation:
- Open data table;
- Create associative array of window titles.
- Lock data table.
- Start log capture.
- Launch Response Screening platform.
- Set response variables: log2in_TMS1, log2in_CG4847, log2in_Adh.
- Set predictor variable: line.
- Save outlier indicators.
- Save standardized residuals.
- End log capture.
Example 12
Summary: Response Screening analysis and saves means differences and p-values in separate data tables, utilizing JMP's built-in functionality.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = dt << Response Screening( Y( :height ), X( :sex ), Robust( 0 ) );
obj << Save Means Differences( 1 );
obj << Save PValues( 1 );
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
);
If( Contains( aftlst[i], "Means Differences" ),
dt3 = Data Table( aftlst[i] )
);
);
mat3 = dt3 << get as matrix;
Close( dt3, no save );
Code Explanation:
- Open data table;
- Create associative array of windows.
- Perform Response Screening analysis.
- Save means differences.
- Save p-values.
- Create associative array of windows again.
- Remove original window titles from new array.
- Get keys of new array.
- Loop through keys.
- Identify and assign PValues and Means Differences tables.
Example 13
Summary: Response Screening analysis and saves p-values and means differences in separate data tables, utilizing associative arrays to manage window titles.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = dt << Response Screening( Y( :height ), X( :sex ), Robust( 1 ), <<Save Means Differences( 1 ) );
obj << Save PValues( 1 );
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
);
If( Contains( aftlst[i], "Means Differences" ),
dt3 = Data Table( aftlst[i] )
);
);
mat3 = dt3 << get as matrix;
Close( dt3, no save );
Close( dt2, no save );
Close( dt, no save );
ut relative epsilon = 1e-2;
Code Explanation:
- Open data table;
- Create associative array before analysis.
- Perform Response Screening analysis.
- Save p-values from analysis.
- Create associative array after analysis.
- Remove unchanged windows from associative array.
- Get list of new windows.
- Loop through new windows.
- Identify and assign PValues table.
- Identify and assign Means Differences table.
Example 14
Summary: Runs the response screening analysis process, generating a PValues table and assigning it to a new data table.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = dt << Response Screening( Y( :age, :sex ), X( :height, :weight ), PValues Table on Launch( 1 ) );
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
)
);
Close( dt2, no save );
Close( dt, no save );
ut relative epsilon = 1e-10;
Code Explanation:
- Open data table.
- Create associative array of windows.
- Perform response screening analysis.
- Create associative array of windows again.
- Remove initial windows from second array.
- Get remaining window keys.
- Loop through window keys.
- Check for "PValues" in window title.
- Assign matching data table to dt2.
- Close dt2 without saving.
- Close original data table without saving.
- Set relative epsilon value.
Example 15
Summary: Response Screening analysis process, generating a PValues table and extracting relevant information from the data.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = dt << Response Screening( Y( :age ), X( :height, :weight ), PValues Table on Launch( 1 ) );
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
)
);
Close( dt2, no save );
Close( dt, no save );
ut relative epsilon = 1e-10;
Code Explanation:
- Open data table.
- Create associative array of windows.
- Run Response Screening analysis.
- Create another associative array of windows.
- Remove original windows from new array.
- Get keys from new array.
- Loop through keys.
- Check for "PValues" in key.
- Open PValues table.
- Close all tables without saving.
Example 16
Summary: Process of performing response screening analysis on a data table, generating PValues tables and identifying data tables with 'PValues' in their titles.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = dt << Response Screening( Y( :sex ), X( :height ), PValues Table on Launch( 1 ) );
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
)
);
Code Explanation:
- Open data table.
- Create associative array before action.
- Perform response screening analysis.
- Create associative array after action.
- Remove common elements from arrays.
- Get remaining window titles.
- Loop through window titles.
- Check for "PValues" in title.
- Identify data table with "PValues".
- Assign identified table to variable.
Example 17
Summary: Runs response screening analysis and saves p-values from a data table, utilizing associative arrays to manage window titles and data tables.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = dt << Response Screening( Y( :log2in_TMS1, :log2in_CG4847, :log2in_Adh ), X( :line ), PValues Table on Launch( 1 ) );
obj << save pvalues;
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
);
If( Contains( aftlst[i], "PValues 2" ),
dt3 = Data Table( aftlst[i] )
);
);
mat2 = dt2 << get as matrix;
mat3 = dt3 << get as matrix;
Code Explanation:
- Open data table.
- Create associative array before analysis.
- Perform response screening analysis.
- Save p-values from analysis.
- Create associative array after analysis.
- Remove pre-analysis windows from associative array.
- Get remaining window titles.
- Loop through window titles.
- Identify "PValues" table.
- Convert "PValues" table to matrix.
Example 18
Summary: Response Screening analysis and extracts PValues tables from a data table, utilizing associative arrays to manage window titles.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = dt << Response Screening(
Y(
:Name( "30D2_7X100_IL_12V" ), :Name( "30D2_7X100_IL_25V" ), :Name( "30N5_2ST(4X100)_ILCSO@12V" ),
:Name( "30N5_2ST(4X100)_ILCSO@25V" ), :Name( "CJP_2(70X1500)_C0V" ), :Name( "CJP_2(70X1500)_C3V" ), :Name( "CJN_2(70X1500)_C0V" ),
:Name( "CJN_2(70X1500)_C3V" )
),
X( :Process ),
PValues Table on Launch( 1 )
);
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
)
);
mat2 = dt2 << get as matrix;
exp1 = [2.3569957997087e-17, 3.66686909347664e-17, 4.66542798301719e-16, 4.91363069949313e-16, 1.38844751899099e-17, 1.46631194925408e-17,
1.43115158671903e-17, 1.41382637572222e-17];
Code Explanation:
- Open data table.
- Create associative array of current windows.
- Run Response Screening analysis.
- Create associative array of new windows.
- Remove initial windows from new array.
- Get keys of remaining windows.
- Loop through window keys.
- Check for "PValues" in window title.
- Assign matching data table to dt2.
- Convert dt2 to matrix.
Example 19
Summary: Response Screening analysis and saves means differences and p-values in separate data tables, utilizing associative arrays to manage window titles.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = dt << Response Screening( Y( :height ), X( :sex ), Robust( 0 ) );
obj << Save Means Differences( 1 );
obj << Save PValues( 1 );
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
);
If( Contains( aftlst[i], "Means Differences" ),
dt3 = Data Table( aftlst[i] )
);
);
mat3 = dt3 << get as matrix;
Code Explanation:
- Open data table;
- Create associative array before analysis.
- Run Response Screening analysis.
- Save means differences.
- Save p-values.
- Create associative array after analysis.
- Remove unchanged windows from array.
- Get keys of remaining windows.
- Loop through window keys.
- Extract tables for p-values and means differences.
Example 20
Summary: Runs the response screening analysis and saves p-values and means differences in separate data tables, utilizing JMP's built-in functionality.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = dt << Response Screening( Y( :height ), X( :sex ), Robust( 1 ), <<Save Means Differences( 1 ) );
obj << Save PValues( 1 );
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
);
If( Contains( aftlst[i], "Means Differences" ),
dt3 = Data Table( aftlst[i] )
);
);
mat3 = dt3 << get as matrix;
Code Explanation:
- Open data table.
- Create associative array before analysis.
- Run response screening analysis.
- Save p-values from analysis.
- Create associative array after analysis.
- Remove pre-analysis windows from associative array.
- Get keys from associative array.
- Loop through keys.
- Identify and assign p-values table.
- Identify and assign means differences table.
Example 21
Summary: Process of running Response Screening analysis and extracting PValues tables from a data table, utilizing associative arrays to manage window titles.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = dt << Response Screening( Y( :age, :sex ), X( :height, :weight ), PValues Table on Launch( 1 ) );
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
)
);
Code Explanation:
- Open data table;
- Create associative array of windows.
- Run Response Screening analysis.
- Create another associative array of windows.
- Remove common windows from second array.
- Get keys from updated array.
- Loop through remaining keys.
- Check for "PValues" in key.
- Assign matching data table to dt2.
Example 22
Summary: Runs response screening analysis on a data table, generating PValues tables and extracting matching data tables.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = dt << Response Screening( Y( :age ), X( :height, :weight ), PValues Table on Launch( 1 ) );
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
)
);
Code Explanation:
- Open data table.
- Create associative array of current windows.
- Perform response screening analysis.
- Create associative array of new windows.
- Remove original windows from new array.
- Get keys of remaining windows.
- Loop through remaining windows.
- Check if window title contains "PValues".
- Assign matching data table to dt2.
- End loop.
Example 23
Summary: Executes Response Screening analysis on a data table, generating a list of windows and filtering out non-PValues tables.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = dt << Response Screening(
Y(
:Gender, :Single Status, :School Age Children, :Age Group, :Employee Tenure, :Position Tenure, :Job Satisfaction,
:I am working on my career, :I want to see the world, :My home needs some major improvements,
:I have vast interests outside of work, :I want to get my debt under control, :I come from a large family, :Brush, :Floss,
:Brush After Waking Up, :Brush After Meal, :Brush Before Sleep, :Brush Other,
),
X( :Salary ),
PValues Table on Lauch( 1 )
);
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
)
);
Code Explanation:
- Open data table.
- Create associative array of windows.
- Run Response Screening analysis.
- Create associative array of windows again.
- Remove original windows from new array.
- Get keys of remaining windows.
- Loop through remaining windows.
- Check if window title contains "PValues".
- Assign matching window to dt2 variable.
- End loop.
Example 24
Summary: Process of screening a data table for response variables, utilizing Response Screening and filtering out common windows to extract relevant PValues tables.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = dt << Response Screening( Y( :age ), X( :sex ), Corr( 1 ), PValues Table On Launch( 1 ) );
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
)
);
mat2 = dt2 << get as matrix;
corr_val = 0.122395420615724;
Code Explanation:
- Open data table;
- Create associative array of windows before running analysis.
- Run Response Screening on age and sex.
- Create associative array of windows after running analysis.
- Remove common windows from after array.
- Get keys of remaining windows.
- Loop through remaining windows.
- Check if window title contains "PValues".
- Assign matching window to dt2.
- Get data table as matrix.
Example 25
Summary: Launches Response Screening in JMP, configuring Y and X variables, paired analysis, and PValues Table display.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = dt << Response Screening(
Y( :Job Satisfaction ),
X( :I am working on my career, :I want to see the world ),
Paired X and Y( 1 ),
PValues Table on Launch( 1 )
);
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
)
);
Code Explanation:
- Open data table;
- Create associative array bef aa.
- Launch Response Screening.
- Set Y to Job Satisfaction.
- Set X to two columns.
- Enable paired X and Y.
- Show PValues Table on launch.
- Create associative array aft aa.
- Remove windows from bef aa in aft aa.
- Get remaining window keys in aftlst.
- Loop through aftlst.
- Check for "PValues" in window titles.
- Assign matching data table to dt2.
Example 26
Summary: Response Screening analysis in JMP, generating a PValues table and extracting specific values from the output.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = dt << Response Screening(
Y( :I am working on my career, :I want to see the world, ),
X( :Single Status ),
Force X Continuous( 1 ),
PValues Table on Launch( 1 )
);
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
)
);
mat2 = dt2 << get as matrix;
pval = mat2[0, 2];
exppval = [0.598778649965148, 0.470758420621694];
exppval = [0.598778649965148, 0.470758420621694];
Code Explanation:
- Open data table;
- Create associative array before analysis.
- Launch Response Screening analysis.
- Set response variables.
- Set predictor variable.
- Force X continuous.
- Include PValues Table on launch.
- Create associative array after analysis.
- Remove unchanged windows.
- Retrieve new window keys.
Example 27
Summary: Processes Response Screening script results, storing window titles and extracting relevant data tables.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
test = Is Scriptable( obj = Response Screening( Y( 8 :: 394 ), X( :Process ), MaxLogWorth( 1000 ), PValues Table on Launch( 1 ) ) );
aft aa = Associative Array( Window() << get window title );
aft aa << Remove( bef aa );
aftlst = aftaa << get keys;
For( i = 1, i <= N Items( aftlst ), i++,
If( Contains( aftlst[i], "PValues" ),
dt2 = Data Table( aftlst[i] )
)
);
Code Explanation:
- Open data table;
- Store initial window titles.
- Run Response Screening script.
- Store updated window titles.
- Remove initial titles from updated list.
- Get remaining window titles.
- Loop through window titles.
- Check for "PValues" in title.
- Assign matching table to dt2.
- End loop.
Response Screening using Set Property
Example 1
Summary: Runs response screening and report generation for a data table with serious events as the response variable, body system or organ class as the predictor, and ratio adjustments to add 0.5 when any zero.
Code:
dt = Open("data_table.jmp");
dt:Description of Planned Arm << Set Property( "Control Level", "Placebo" );
dt:Description of Planned Arm << Set Name( "Arm" );
obj = dt << Response Screening(
Y( :Serious Event ),
X( :Body System or Organ Class ),
Ratio Adjustment( "Add 0.5 when any zero" ),
Plots( 0 ),
"2 by M Table"n( 1 ),
SendToReport( Dispatch( {}, "", TabListBox( 2 ), {Set Selected( 2 )} ) )
);
rpt = Report( obj );
Code Explanation:
- Open data table;
- Set Control Level to Placebo.
- Rename column to Arm.
- Run Response Screening.
- Specify Serious Event as response.
- Use Body System as predictor.
- Adjust ratios adding 0.5.
- Disable plots display.
- Create 2 by M Table.
- Select second tab in report.
Example 2
Summary: Extracts X Baseline values from a report object, utilizing Response Screening analysis and control levels for Age Group.
Code:
dt = Open("data_table.jmp");
dt:Age Group << Set Property( "Control Level", ">54" );
obj = dt << Response Screening( X( :Age Group ), Y( :Single Status, :Gender, :I am working on my career ) );
rpt = Report( obj );
BaselineCont = rpt[Tab Page Box( 4 ), String Col Box( "X Baseline" )][1, 1];
Code Explanation:
- Open data table.
- Set control level for Age Group.
- Run Response Screening analysis.
- Create report object.
- Access Baseline Cont tab page.
- Extract X Baseline column box.
- Retrieve first row value.
Response Screening using Expr
Summary: Runs a response screening analysis to identify serious events in a clinical trial, utilizing custom ordering and control levels for the 'Arm' column.
Code:
dt = Open("data_table.jmp");
doScreening = Expr(
Response Screening(
Y( :Serious Event ),
X( :Arm ),
Title( Eval( theTitle ) ),
Grouping( :Body System or Organ Class ),
Show Plots( 0 ),
SendToReport(
Dispatch( {}, "", TabListBox( 2 ), {Set Selected( 2 )} ),
Dispatch( {}, "X Category", StringColBox, {Visibility( "Visible" )} ),
Dispatch( {}, "X Baseline", StringColBox, {Visibility( "Visible" )} )
)
)
);
dt:Description of Planned Arm << Set Name( "Arm" );
theTitle = "Default Baseline is Low, which is NIC.15";
obj = doScreening;
rpt = Report( obj );
baseline = (rpt[Tab Page Box( 2 ), String Col Box( "X Baseline" )] << Get)[1];
dt:Arm << Set Property( "Value Order", {Custom Order( {"NIC .15", "Placebo"} ), Common Order( 0 )} );
theTitle = "After Value Order, NIC.15 is still low and default Baseline";
obj2 = doScreening;
rpt2 = Report( obj2 );
baseline = (rpt2[Tab Page Box( 2 ), String Col Box( "X Baseline" )] << Get)[1];
theTitle = "After specifying Control Level Placebo in Column Property";
dt:Arm << Set Property( "Control Level", "Placebo" );
obj3 = doScreening;
rpt3 = Report( obj3 );
baseline_act = (rpt3[Tab Page Box( 2 ), String Col Box( "X Baseline" )] << Get)[1];
Code Explanation:
- Open data table;
- Define expression for screening.
- Rename column "Description of Planned Arm" to "Arm".
- Set title to "Default Baseline is Low, which is NIC.15".
- Execute screening analysis.
- Retrieve report object.
- Extract baseline value.
- Set custom order for "Arm" column.
- Update title to "After Value Order, NIC.15 is still low and default Baseline".
- Execute screening analysis again.
- Retrieve updated report object.
- Extract new baseline value.
- Set control level to "Placebo" in "Arm" column.
- Execute screening analysis once more.
- Retrieve final report object.
- Extract actual baseline value.
Response Screening using Summary
Summary: Creates summary tables by sex and age, extracts specific columns from these summaries, and performs a response screening analysis to analyze height and weight data.
Code:
dt = Open("data_table.jmp");
dtsum1 = dt << Summary(
Group( :sex ),
Min( :height ),
Quantiles( 25, :height ),
Median( :height ),
Quantiles( 75, :height ),
Max( :height ),
Range( :height ),
Freq( "None" ),
Weight( "None" ),
output table name( "Summary of height grouped by sex" )
);
mat1 = dtsum1 << get as matrix( {3, 4, 5, 6, 7, 8} );
dtsum2 = dt << Summary(
Group( :age ),
Min( :weight ),
Quantiles( 25, :weight ),
Median( :weight ),
Quantiles( 75, :weight ),
Max( :weight ),
Range( :weight ),
Freq( "None" ),
Weight( "None" ),
output table name( "Summary of weight grouped by age" )
);
mat2 = dtsum2 << get as matrix( {3, 4, 5, 6, 7, 8} );
rs_obj = dt << Response Screening(
Y( :height, :weight ),
X( :sex, :age ),
Paired X and Y( 1 ),
Quartiles per group( 1 ),
SendToReport( Dispatch( {}, "", TabListBox( 2 ), {Set Selected( 2 )} ) )
);
Code Explanation:
- Open data table.
- Create summary table by sex.
- Extract specific columns from summary.
- Create summary table by age.
- Extract specific columns from summary.
- Perform response screening analysis.
- Set Y variables: height, weight.
- Set X variables: sex, age.
- Configure paired X and Y.
- Configure quartiles per group.