Profiler
Example 1
Summary: Generates a Profiler to analyze the Time 2sided response variable, adjusting for Firth bias and including likelihood ratio tests. The script uses a Simulator with random normal weights for factors and defines term values for each factor.
Code:
// Profiler Time2sided
// Open data table
dt = Open("data_table.jmp");
// Profiler Time2sided
Profiler(
Y( :Time 2sided ),
Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
Receive Application(
13,
Min( 7 ),
Max( 25 )
),
Review(
14,
Min( 7 ),
Max( 25 )
),
Credit Check(
15,
Min( 7 ),
Max( 25 )
),
Loan Finalization(
16,
Min( 7 ),
Max( 25 )
)
),
Simulator(
1,
Factors(
Receive Application <<
Random(
Normal weighted(
13, 1
)
),
Review <<
Random(
Normal weighted(
14, 2
)
),
Credit Check <<
Random(
Normal weighted(
15, 3
)
),
Loan Finalization <<
Random(
Normal weighted(
16, 4
)
)
),
Responses(
Time 2sided << No Noise
),
Defect Profiler( 1 ),
Defect Parametric Profile(
1
)
)
)
);
Code Explanation:
- Open data table.
- Create Profiler.
- Set Y variable.
- Enable Confidence Intervals.
- Set Term Values for factors.
- Configure Simulator.
- Define Random Normal weights for factors.
- Set Response with No Noise.
- Enable Defect Profiler.
- Enable Defect Parametric Profile.
Example 2
Summary: Opens a data table, launches the Profiler Simulator, and configures it to analyze yield response limits with confidence intervals and desirability functions.
Code:
// Profiler Simulator
// Open data table
dt = Open("data_table.jmp");
// Profiler Simulator
Profiler(
Y( :Yield ),
Profiler(
1,
Confidence Intervals( 1 ),
Desirability Functions( 1 ),
Yield <<
Response Limits(
{Lower( 0.5, 0.05 ),
Middle( 0.6, 0.75 ),
Upper(
0.625, 0.815624999999997
), Goal( Maximize ),
Importance( 1 )}
),
Term Value(
Reaction Temperature(
525.82376091265
),
Reaction Time(
0.298,
Min( 0.101 )
)
),
Simulator(
1,
Factors(
Reaction Temperature <<
Random(
Normal weighted(
525.82376091265,
1
)
),
Reaction Time <<
Random(
Normal weighted(
0.298, 0.03
)
)
),
Responses(
Yield << No Noise
)
)
),
Expand
);
Code Explanation:
- Open data table.
- Launch Profiler.
- Set response variable.
- Enable profiler settings.
- Configure confidence intervals.
- Enable desirability functions.
- Define yield response limits.
- Set lower limit.
- Set middle limit.
- Set upper limit.
Example 3
Summary: Visualizes a prediction profiler using the GP Fit, NL Fit, and Difference response variables from an open data table, with confidence intervals and term values adjusted for Firth bias.
Code:
// Profiler
// Open data table
dt = Open("data_table.jmp");
// Profiler
Profiler(
Y( :GP Fit, :NL Fit, :Difference ),
Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
l( 0.5 ),
k( 0.3966 )
)
),
Expand,
SendToReport(
Dispatch( {"Prediction Profiler"},
"Profiler", FrameBox,
Frame Size( 174, 87 )
),
Dispatch( {"Prediction Profiler"},
"Profiler", FrameBox( 2 ),
Frame Size( 174, 87 )
),
Dispatch( {"Prediction Profiler"},
"Profiler", FrameBox( 3 ),
Frame Size( 174, 87 )
),
Dispatch( {"Prediction Profiler"},
"Profiler", FrameBox( 5 ),
Frame Size( 174, 87 )
),
Dispatch( {"Prediction Profiler"},
"Profiler", FrameBox( 6 ),
Frame Size( 174, 87 )
),
Dispatch( {"Prediction Profiler"},
"Profiler", FrameBox( 7 ),
Frame Size( 174, 87 )
)
)
);
Code Explanation:
- Open data table.
- Launch Profiler.
- Set response variables.
- Configure Profiler settings.
- Enable confidence intervals.
- Set term values.
- Expand Profiler.
- Adjust report size.
- Adjust report size.
- Adjust report size.
Example 4
Summary: Opens a data table, launches the Profiler, and configures it to simulate yield response with reaction temperature and time as factors, while adjusting for Firth bias and including likelihood ratio tests.
Code:
// Profiler Ready to Simulate
// Open data table
dt = Open("data_table.jmp");
// Profiler Ready to Simulate
Profiler(
Y( :Yield ),
Profiler(
1,
Confidence Intervals( 1 ),
Desirability Functions( 1 ),
Yield <<
Response Limits(
{Lower( 0.5, 0.05 ),
Middle( 0.6, 0.75 ),
Upper( 0.625, 0.815625 ),
Goal( Maximize ),
Importance( 1 )}
),
Term Value(
Reaction Temperature( 530 ),
Reaction Time(
0.2,
Min( 0.101 )
)
),
Simulator(
1,
Factors(
Reaction Temperature <<
Random(
Normal weighted(
530, 1
)
),
Reaction Time <<
Random(
Normal weighted(
0.2, 0.03
)
)
),
Responses(
Yield << No Noise
)
),
Desirability Functions( 0 ),
Simulator( 0 )
),
Expand
);
Code Explanation:
- Open data table.
- Launch Profiler.
- Set response variable.
- Configure confidence intervals.
- Enable desirability functions.
- Define yield response limits.
- Set reaction temperature term value.
- Set reaction time term value.
- Enable simulator.
- Define random factors for simulation.
Example 5
Summary: Creates a profiler object to analyze the relationships between ABRASION, MODULUS, ELONG, and HARDNESS in a data table, utilizing desirability functions.
Code:
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Desirability Functions( 1 )
);
Code Explanation:
- Set default names.
- Open data table;
- Create profiler object.
- Set response variables.
- Enable desirability functions.
Example 6
Summary: Creates a profiler object to analyze the relationships between ABRASION, MODULUS, ELONG, and HARDNESS variables in a data table, with term values set for SILICA, SILANE, and SULFUR.
Code:
Open("data_table.jmp");
obj = Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler(
1,
Arrange in Rows( 2 ),
Term Value( SILICA( 1.25, Lock( 0 ), Show( 1 ) ), SILANE( 50, Lock( 0 ), Show( 1 ) ), SULFUR( 2.25, Lock( 0 ), Show( 1 ) ) )
)
);
Code Explanation:
- Open data table;
- Create profiler object.
- Set response variables.
- Configure profiler settings.
- Arrange rows in profiler.
- Set term values for silica.
- Set term values for silane.
- Set term values for sulfur.
- Lock silica term.
- Lock silane term.
Example 7
Summary: Creates a profiler object to analyze population age demographics, specifying term values and arranging rows for visualization.
Code:
Open("data_table.jmp");
obj = Profiler(
Y( :Name( "Pop Age 0-19" ), :Name( "Pop Age 20-59" ), :Name( "Pop Age 60+" ) ),
Profiler(
1,
Arrange in Rows( 3 ),
Term Value(
Name( "Pop Age 0-19 M" )(92500000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 0-19 F" )(100000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 20-59 M" )(40000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 20-59 F" )(40000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 60+ M" )(10000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 60+ F" )(14000000, Lock( 0 ), Show( 1 ))
)
)
);
Code Explanation:
- Open data table;
- Create profiler object.
- Set response variables.
- Configure profiler settings.
- Arrange rows in profiler.
- Set term values for each variable.
- Unlock term values.
- Display all terms.
- Initialize "Pop Age 0-19 M" term.
- Initialize "Pop Age 0-19 F" term.
Example 8
Summary: Configures a profiler object to analyze population age demographics, specifying term values for male and female populations across three age groups.
Code:
Open("data_table.jmp");
obj = Profiler(
Y( :Name( "Pop Age 0-19" ), :Name( "Pop Age 20-59" ), :Name( "Pop Age 60+" ) ),
Profiler(
1,
Arrange in Rows( 4 ),
Term Value(
Name( "Pop Age 0-19 M" )(92500000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 0-19 F" )(100000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 20-59 M" )(40000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 20-59 F" )(40000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 60+ M" )(10000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 60+ F" )(14000000, Lock( 0 ), Show( 1 ))
)
)
);
Code Explanation:
- Open data table.
- Create profiler object.
- Set response variables.
- Configure profiler settings.
- Arrange profiles in rows.
- Set term values for "Pop Age 0-19 M".
- Set term values for "Pop Age 0-19 F".
- Set term values for "Pop Age 20-59 M".
- Set term values for "Pop Age 20-59 F".
- Set term values for "Pop Age 60+ M".
- Set term values for "Pop Age 60+ F".
Example 9
Summary: Creates a prediction profiler in JMP, configuring term values and arranging profiles in rows for analysis.
Code:
Open("data_table.jmp");
obj = Profiler(
Y( :Pred Formula Y ),
Profiler(
1,
Profile at Boundary( "Turn at Boundaries" ),
Arrange in Rows( 2 ),
Term Value(
p1( 0.6615, Min( 0.474 ), Max( 0.849 ), Lock( 0 ), Show( 1 ) ),
p2( 0.126, Max( 0.252 ), Lock( 0 ), Show( 1 ) ),
p3( 0.2125, Min( 0.151 ), Max( 0.274 ), Lock( 0 ), Show( 1 ) )
)
)
);
Code Explanation:
- Open data table;
- Create profiler object.
- Set response variable.
- Configure profiler settings.
- Set profile at boundaries.
- Arrange profiles in rows.
- Define term values.
- Set p1 value and constraints.
- Set p2 value and constraints.
- Set p3 value and constraints.
Example 10
Summary: Creates a profiler object to visualize and analyze data from the 'data_table.jmp' file, with specific settings for term values, boundaries, and arrangement.
Code:
Open("data_table.jmp");
obj = Profiler(
Y( :Pred Formula Y ),
Profiler(
1,
Profile at Boundary( "Turn at Boundaries" ),
Arrange in Rows( 1 ),
Term Value(
p1( 0.6615, Min( 0.474 ), Max( 0.849 ), Lock( 0 ), Show( 1 ) ),
p2( 0.126, Max( 0.252 ), Lock( 0 ), Show( 1 ) ),
p3( 0.2125, Min( 0.151 ), Max( 0.274 ), Lock( 0 ), Show( 1 ) )
)
)
);
Code Explanation:
- Open data table;
- Create profiler object.
- Set response variable.
- Configure profiler settings.
- Profile at boundaries.
- Arrange profiles in rows.
- Set term values for p1.
- Set minimum and maximum for p1.
- Set term values for p2.
- Set maximum for p2.
- Set term values for p3.
- Set minimum and maximum for p3.
Example 11
Summary: Calculates profit-related metrics, including Revenue, Product Cost, and Customer Service Cost, using a Profiler object in JMP.
Code:
Open("data_table.jmp");
obj = Profiler(
Y( :Profit ),
Profiler(
1,
Term Value(
Revenue( 3750, Lock( 0 ), Show( 1 ) ),
Product Cost( 4625, Lock( 0 ), Show( 1 ) ),
Customer Service Cost( 925, Lock( 0 ), Show( 1 ) )
)
)
);
Code Explanation:
- Open data table.
- Create profiler object.
- Set response variable.
- Configure profiler settings.
- Define term values.
- Set Revenue value.
- Unlock Revenue.
- Display Revenue.
- Set Product Cost value.
- Unlock Product Cost.
- Display Product Cost.
- Set Customer Service Cost value.
- Unlock Customer Service Cost.
- Display Customer Service Cost.
Example 12
Summary: Creates a prediction profiler with specified term values and boundary settings, sending the report to the Prediction Profiler platform.
Code:
dt under test = Open("data_table.jmp");
obj = Profiler(
Y( :Pred Formula Y ),
Profiler(
1,
Profile at Boundary( "Turn at Boundaries" ),
Term Value(
p1( 0.6615, Min( 0.474 ), Max( 0.849 ), Lock( 0 ), Show( 1 ) ),
p2( 0.126, Max( 0.252 ), Lock( 0 ), Show( 1 ) ),
p3( 0.2125, Min( 0.151 ), Max( 0.274 ), Lock( 0 ), Show( 1 ) )
)
),
SendToReport(
Dispatch( {"Prediction Profiler"}, "Profiler", FrameBox, {Frame Size( 200, 166 )} ),
Dispatch( {"Prediction Profiler"}, "Profiler", FrameBox( 3 ), {Frame Size( 200, 166 )} ),
Dispatch( {"Prediction Profiler"}, "Profiler", FrameBox( 5 ), {Frame Size( 200, 166 )} )
)
);
Code Explanation:
- Open data table;
- Create Profiler object.
- Set response variable Pred Formula Y.
- Configure Profiler settings.
- Profile at boundaries.
- Set initial term values.
- Lock terms p1, p2, p3.
- Display terms p1, p2, p3.
- Send report to Prediction Profiler.
- Adjust frame sizes for visualization.
Example 13
Summary: Runs the construction of a choice model using Profiles, Responses, and Subjects data tables in JMP, specifying response, profile, and subject effects while adjusting for Firth bias and including likelihood ratio tests.
Code:
dt = Open("data_table.jmp");
Profiler( Y( :GP Fit, :NL Fit, :Difference ), Profiler( 1, Confidence Intervals( 1 ), Term Value( l( 0.5 ), k( 0.3966 ) ) ) );
Code Explanation:
- Open data table.
- Launch Profiler platform.
- Set response variables.
- Configure Profiler settings.
- Enable confidence intervals.
- Set term values for l.
- Set term values for k.
Example 14
Summary: Creates a profiler object to analyze Yield response variable, with specified confidence intervals and desirability functions, using Simulator settings and initial term values.
Code:
Open("data_table.jmp");
obj = Profiler(
Y( :Yield ),
Profiler(
1,
Confidence Intervals( 1 ),
Desirability Functions( 1 ),
Yield << Response Limits( {Lower( 0.5, 0.05 ), Middle( 0.6, 0.75 ), Upper( 0.625, 0.815625 ), Goal( Maximize ), Importance( 1 )} ),
Term Value( Reaction Temperature( 530 ), Reaction Time( 0.2, Min( 0.101 ) ) ),
Simulator(
1,
Factors( Reaction Temperature << Random( Normal weighted( 530, 1 ) ), Reaction Time << Random( Normal weighted( 0.2, 0.03 ) ) ),
Responses( Yield << No Noise )
),
Desirability Functions( 0 ),
Simulator( 0 )
),
Expand
);
Code Explanation:
- Open data table;
- Create profiler object.
- Set response variable.
- Enable profiler settings.
- Configure confidence intervals.
- Enable desirability functions.
- Define response limits.
- Set initial term values.
- Configure simulator settings.
- Expand profiler view.
Example 15
Summary: Creates a profiler object to analyze the relationship between ABRASION, MODULUS, ELONG, and HARDNESS in a data table, with specific term values for SILICA, SILANE, and SULFUR.
Code:
dt under test = Open("data_table.jmp");
obj = Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler(
1,
Term Value( SILICA( 1.25, Lock( 0 ), Show( 1 ) ), SILANE( 50, Lock( 0 ), Show( 1 ) ), SULFUR( 2.25, Lock( 0 ), Show( 1 ) ) ),
Simulator(
1,
Factors( SILICA << Fixed( 1.25 ), SILANE << Fixed( 50 ), SULFUR << Fixed( 2.25 ) ),
Responses(
Pred Formula ABRASION << No Noise, Pred Formula MODULUS << No Noise, Pred Formula ELONG << No Noise,
Pred Formula HARDNESS << No Noise
)
)
)
);
Code Explanation:
- Open data table;
- Create Profiler object.
- Set response variables.
- Configure Profiler settings.
- Lock SILICA term.
- Lock SILANE term.
- Lock SULFUR term.
- Initialize Simulator.
- Fix SILICA factor.
- Fix SILANE factor.
- Fix SULFUR factor.
- Disable noise for responses.
Example 16
Summary: Configures a profiler object to analyze data from the 'data_table.jmp' file, specifying response, profile, and subject effects while adjusting for Firth bias and including likelihood ratio tests.
Code:
Open("data_table.jmp");
obj = Profiler(
Y( :Time 2sided ),
Profiler(
1,
Term Value(
Receive Application( 16, Min( 7 ), Max( 25 ), Lock( 0 ), Show( 1 ) ),
Review( 16, Min( 7 ), Max( 25 ), Lock( 0 ), Show( 1 ) ),
Credit Check( 16, Max( 25 ), Lock( 0 ), Show( 1 ) ),
Loan Finalization( 16, Max( 25 ), Lock( 0 ), Show( 1 ) )
)
)
);
Code Explanation:
- Open data table;
- Create profiler object.
- Set response variable.
- Configure profiler settings.
- Define term values.
- Set initial value for "Receive Application".
- Set minimum and maximum for "Receive Application".
- Set initial value for "Review".
- Set minimum and maximum for "Review".
- Set initial value for "Credit Check".
Example 17
Summary: Creates a Profiler object to analyze the relationship between ln(dose) and Dose, with adjustments for Firth bias and likelihood ratio tests.
Code:
dt under test = Open("data_table.jmp");
obj = Profiler( Y( :Name( "ln(dose)" ) ), Profiler( 1, Term Value( Dose( 2.25, Lock( 0 ), Show( 1 ) ) ) ) );
Code Explanation:
- Open data_table data
- Create Profiler object.
- Set response variable ln(dose).
- Add Profiler analysis.
- Specify term value for Dose.
- Set Dose value to 2.25.
- Unlock Dose parameter.
- Display Dose parameter.
Example 18
Summary: Creates a profiler object to analyze data table 'data_table.jmp', specifying response, profile, and subject effects, and adjusting for Firth bias with likelihood ratio tests.
Code:
dt under test = Open("data_table.jmp");
obj = Profiler(
Y( :Pred Formula Y ),
Profiler(
1,
Profile at Boundary( "Turn at Boundaries" ),
Term Value(
p1( 0.6615, Min( 0.474 ), Max( 0.849 ), Lock( 0 ), Show( 1 ) ),
p2( 0.126, Max( 0.252 ), Lock( 0 ), Show( 1 ) ),
p3( 0.2125, Min( 0.151 ), Max( 0.274 ), Lock( 0 ), Show( 1 ) )
)
)
);
Code Explanation:
- Open data table;
- Create profiler object.
- Set response variable.
- Configure profiler settings.
- Set boundary behavior.
- Define term values.
- Set initial value for p1.
- Set min and max for p1.
- Unlock p1.
- Show p1.
Example 19
Summary: Creates a profiler object to analyze the relationship between ABRASION, MODULUS, ELONG, and HARDNESS variables in a data table, with specific term values for SILICA, SILANE, and SULFUR predictors.
Code:
dt under test = Open("data_table.jmp");
obj = Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler(
1,
Term Value( SILICA( 1.25, Lock( 0 ), Show( 1 ) ), SILANE( 50, Lock( 0 ), Show( 1 ) ), SULFUR( 2.25, Lock( 0 ), Show( 1 ) ) )
)
);
Code Explanation:
- Open data table;
- Create profiler object.
- Set response variables.
- Configure profiler settings.
- Set term values for predictors.
- Lock predictor SILICA.
- Show predictor SILICA.
- Lock predictor SILANE.
- Show predictor SILANE.
- Lock predictor SULFUR.
- Show predictor SULFUR.
Example 20
Summary: Creates a prediction profiler to analyze data in the 'data_table.jmp' table, specifying noise factors and response variables.
Code:
dt under test = Open("data_table.jmp");
obj = Profiler(
Noise Factors( :p3 ),
Y( :Pred Formula Y ),
Profiler(
1,
Profile at Boundary( "Turn at Boundaries" ),
Term Value(
p1( 0.6615, Min( 0.474 ), Max( 0.849 ), Lock( 0 ), Show( 1 ) ),
p2( 0.126, Max( 0.252 ), Lock( 0 ), Show( 1 ) ),
p3( 0.2125, Min( 0.151 ), Max( 0.274 ), Lock( 0 ), Show( 1 ) )
)
)
);
Code Explanation:
- Open data table;
- Create Profiler object.
- Set noise factor to p3.
- Set response variable to Pred Formula Y.
- Initialize nested Profiler.
- Enable boundary profiling.
- Set initial value for p1.
- Define min and max for p1.
- Set initial value for p2.
- Define max for p2.
Example 21
Summary: Creates a Profiler object to analyze population age distribution, specifying term values and locking them off for further analysis.
Code:
Open("data_table.jmp");
obj = Profiler(
Y( :Name( "Pop Age 0-19" ), :Name( "Pop Age 20-59" ), :Name( "Pop Age 60+" ) ),
Profiler(
1,
Term Value(
Name( "Pop Age 0-19 M" )(92500000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 0-19 F" )(100000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 20-59 M" )(40000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 20-59 F" )(40000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 60+ M" )(10000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 60+ F" )(14000000, Lock( 0 ), Show( 1 ))
)
)
);
Code Explanation:
- Open data table;
- Create Profiler object.
- Set response variables.
- Configure Profiler settings.
- Set term values.
- Lock term values off.
- Show all terms.
- Assign value for "Pop Age 0-19 M".
- Assign value for "Pop Age 0-19 F".
- Assign values for remaining terms.
Example 22
Summary: Runs a profiler analysis to optimize multiple response variables, including ABRASION, MODULUS, ELONG, and HARDNESS, by defining limits, goals, and initial factor values.
Code:
Names Default To Here( 1 );
dt = Open("data_table.jmp");
Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler(
1,
Desirability Functions( 1 ),
Pred Formula ABRASION << Response Limits(
{Lower( 90, 0.066 ), Middle( 145, 0.5 ), Upper( 200, 0.9819 ), Goal( "Maximize" ), Importance( 1 )}
),
Pred Formula MODULUS << Response Limits(
{Lower( 500, 0.066 ), Middle( 1375, 0.5 ), Upper( 2250, 0.9819 ), Goal( "Maximize" ), Importance( 1 )}
),
Pred Formula ELONG << Response Limits(
{Lower( 200, 0.066 ), Middle( 425, 0.5 ), Upper( 650, 0.9819 ), Goal( "Maximize" ), Importance( 1 )}
),
Pred Formula HARDNESS << Response Limits(
{Lower( 60, 0.066 ), Middle( 70, 0.5 ), Upper( 80, 0.9819 ), Goal( "Maximize" ), Importance( 1 )}
),
Term Value(
SILICA( 0.98793639563904, Lock( 0 ), Show( 1 ) ),
SILANE( 66.33, Lock( 0 ), Show( 1 ) ),
SULFUR( 3.1165, Lock( 0 ), Show( 1 ) )
),
Simulator(
1,
Factors( SILICA << Fixed( 0.98793639563904 ), SILANE << Fixed( 66.33 ), SULFUR << Fixed( 3.1165 ) ),
Responses(
Pred Formula ABRASION << No Noise, Pred Formula MODULUS << No Noise, Pred Formula ELONG << No Noise,
Pred Formula HARDNESS << No Noise
)
)
)
);
Code Explanation:
- Set default names.
- Open data_table data
- Start profiler analysis.
- Set response variables.
- Configure profiler settings.
- Define ABRASION limits and goal.
- Define MODULUS limits and goal.
- Define ELONG limits and goal.
- Define HARDNESS limits and goal.
- Set initial factor values.
Example 23
Summary: Creates a choice model using Profiler, Responses, and Subjects data tables, specifying response, profile, and subject effects while adjusting for Firth bias and including likelihood ratio tests.
Code:
dt under test = Open("data_table.jmp");
obj = Profiler(
Y( :Time 2sided ),
Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
Receive Application( 13, Min( 7 ), Max( 25 ) ),
Review( 14, Min( 7 ), Max( 25 ) ),
Credit Check( 15, Min( 7 ), Max( 25 ) ),
Loan Finalization( 16, Min( 7 ), Max( 25 ) )
),
Simulator(
1,
Factors(
Receive Application << Random( Normal weighted( 13, 1 ) ), Review << Random( Normal weighted( 14, 2 ) ),
Credit Check << Random( Normal weighted( 15, 3 ) ), Loan Finalization << Random( Normal weighted( 16, 4 ) )
),
Responses( Time 2sided << No Noise ),
Defect Profiler( 1 ),
Defect Parametric Profile( 1 )
)
)
);
Code Explanation:
- Open data table.
- Create Profiler object.
- Set response variable.
- Configure Profiler settings.
- Define term values.
- Enable confidence intervals.
- Initialize Simulator.
- Set random factors.
- Define response without noise.
- Enable Defect Profiler.
Example 24
Summary: Creates a prediction profiler to analyze data from the 'data_table.jmp' file, specifying response limits and goal for maximum desirability.
Code:
Open("data_table.jmp");
obj = Profiler(
Y( :Y ),
Profiler(
1,
Desirability Functions( 0 ),
Y << Response Limits( {Lower( -1.25, 0.066 ), Middle( 0, 0.5 ), Upper( 1.25, 0.9819 ), Goal( "Maximize" ), Importance( 1 )} ),
Term Value( X1( 0, Lock( 0 ), Show( 1 ) ), X2( 0, Lock( 0 ), Show( 1 ) ) )
),
SendToReport(
Dispatch( {"Prediction Profiler"}, "Profiler", FrameBox, {Frame Size( 249, 212 )} ),
Dispatch( {"Prediction Profiler"}, "Profiler", FrameBox( 3 ), {Frame Size( 249, 212 )} )
)
);
Code Explanation:
- Open data table;
- Create profiler object.
- Set response variable.
- Configure profiler settings.
- Define response limits.
- Set goal for response.
- Specify term values.
- Lock term values.
- Show terms in profiler.
- Adjust frame sizes.
Example 25
Summary: Runs the simulation and profiling process for a material properties prediction model, defining response limits and goals for ABRASION, MODULUS, ELONG, and HARDNESS, and configuring simulator factors and responses.
Code:
Open("data_table.jmp");
Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler(
1,
Pred Formula ABRASION << Response Limits(
{Lower( 90, 0.066 ), Middle( 145, 0.5 ), Upper( 200, 0.9819 ), Goal( "Maximize" ), Importance( 1 )}
),
Pred Formula MODULUS << Response Limits(
{Lower( 500, 0.066 ), Middle( 1375, 0.5 ), Upper( 2250, 0.9819 ), Goal( "Maximize" ), Importance( 1 )}
),
Pred Formula ELONG << Response Limits(
{Lower( 200, 0.066 ), Middle( 425, 0.5 ), Upper( 650, 0.9819 ), Goal( "Maximize" ), Importance( 1 )}
),
Pred Formula HARDNESS << Response Limits(
{Lower( 60, 0.066 ), Middle( 70, 0.5 ), Upper( 80, 0.9819 ), Goal( "Maximize" ), Importance( 1 )}
),
Term Value( SILICA( 1.25, Lock( 0 ), Show( 1 ) ), SILANE( 50, Lock( 0 ), Show( 1 ) ), SULFUR( 2.25, Lock( 0 ), Show( 1 ) ) ),
Simulator(
1,
Factors(
SILICA << Random( Normal( 1.25, 0.3266 ) ), SILANE << Random( Normal( 50, 6.532 ) ),
SULFUR << Random( Normal( 2.25, 0.3266 ) )
),
Responses(
Pred Formula ABRASION << No Noise, Pred Formula MODULUS << No Noise, Pred Formula ELONG << No Noise,
Pred Formula HARDNESS << No Noise
),
Resimulate
)
),
);
Code Explanation:
- Open data_table data
- Start Profiler.
- Set response variables.
- Define ABRASION limits and goal.
- Define MODULUS limits and goal.
- Define ELONG limits and goal.
- Define HARDNESS limits and goal.
- Set initial factor values.
- Configure simulator factors.
- Configure simulator responses and resimulate.
Example 26
Summary: Creates and configures a custom profiler object in JMP, specifying response variables, profile effects, and subject adjustments for Firth bias and likelihood ratio tests.
Code:
dt = Open("data_table.jmp");
obj_cust = dt << Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler(
1,
Desirability Functions( 1 ),
Term Value( :SILICA( 1.2, Lock( 0 ), Show( 1 ) ), :SILANE( 50, Lock( 0 ), Show( 1 ) ), :SULFUR( 2.3, Lock( 0 ), Show( 1 ) ) )
)
);
obj = dt << Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) );
preset = obj_cust << New Preset;
obj << Apply Preset( Preset );
Code Explanation:
- Open data table;
- Create custom profiler object.
- Set response variables.
- Configure profiler settings.
- Lock term values.
- Show term values.
- Create another profiler object.
- Set response variables.
- Save custom preset.
- Apply saved preset.
Example 27
Summary: Creates and configures a custom profiler object in JMP, specifying response variables, profile settings, and term values for SILICA, SILANE, and SULFUR.
Code:
dt = Open("data_table.jmp");
obj_cust = dt << Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler(
1,
Desirability Functions( 0 ),
Overlaid Interactions( 1 ),
Data Points( 1 ),
Term Value( :SILICA( 1.2, Lock( 0 ), Show( 1 ) ), :SILANE( 50, Lock( 0 ), Show( 1 ) ), :SULFUR( 2.3, Lock( 0 ), Show( 1 ) ) )
)
);
obj = dt << Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) );
preset = obj_cust << New Preset;
obj << Apply Preset( Preset );
Code Explanation:
- Open data table;
- Create custom profiler object.
- Set response variables: ABRASION, MODULUS, ELONG, HARDNESS.
- Configure profiler settings.
- Enable overlaid interactions.
- Display data points.
- Set term values for SILICA, SILANE, SULFUR.
- Create default profiler object.
- Save custom profiler as preset.
- Apply saved preset to default profiler.
Example 28
Summary: Creates and configures a Prediction Profiler in JMP, using the data_table.jmp dataset to analyze the relationships between ABRASION, MODULUS, ELONG, and HARDNESS.
Code:
dt = Open("data_table.jmp");
obj_cust = dt << Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler(
1,
Desirability Functions( 0 ),
Sensitivity Indicator( 1 ),
Independent Uniform Inputs( 1 ),
Reorder X Variables( :SILANE, :SILICA, :SULFUR ),
Term Value( :SILICA( 1.2, Lock( 0 ), Show( 1 ) ), :SILANE( 50, Lock( 0 ), Show( 1 ) ), :SULFUR( 2.3, Lock( 0 ), Show( 1 ) ) )
),
SendToReport(
Dispatch( {"Prediction Profiler", "Variable Importance: Independent Uniform Inputs"}, "Summary Report", OutlineBox, {Close( 1 )} )
)
);
obj = dt << Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) );
preset = obj_cust << New Preset;
obj << Apply Preset( Preset );
Code Explanation:
- Open data_table data
- Create Profiler object.
- Set response variables.
- Configure Profiler settings.
- Disable Summary Report.
- Order X variables.
- Set initial term values.
- Save Profiler preset.
- Apply saved preset.
Example 29
Summary: Creates a profiler object to analyze the relationship between Abrasion, Modulus, Elongation, and Hardness in a data table, with specific term values for Silica, Silane, and Sulfur.
Code:
dt under test = Open("data_table.jmp");
obj = Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler(
1,
Arrange in Rows( 2 ),
Term Value( SILICA( 1.25, Lock( 0 ), Show( 1 ) ), SILANE( 50, Lock( 0 ), Show( 1 ) ), SULFUR( 2.25, Lock( 0 ), Show( 1 ) ) )
)
);
Code Explanation:
- Open data table;
- Create profiler object.
- Specify response variables.
- Configure profiler settings.
- Arrange plots in rows.
- Set term values for silica.
- Lock silica value.
- Show silica value.
- Set term values for silane.
- Lock silane value.
- Show silane value.
- Set term values for sulfur.
- Lock sulfur value.
- Show sulfur value.
Example 30
Summary: Creates a profiler object to visualize population age distribution, specifying response and profile effects, and adjusting for Firth bias.
Code:
dt under test = Open("data_table.jmp");
obj = Profiler(
Y( :Name( "Pop Age 0-19" ), :Name( "Pop Age 20-59" ), :Name( "Pop Age 60+" ) ),
Profiler(
1,
Arrange in Rows( 3 ),
Term Value(
Name( "Pop Age 0-19 M" )(92500000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 0-19 F" )(100000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 20-59 M" )(40000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 20-59 F" )(40000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 60+ M" )(10000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 60+ F" )(14000000, Lock( 0 ), Show( 1 ))
)
)
);
Code Explanation:
- Open data table.
- Create profiler object.
- Set response variables.
- Configure profiler settings.
- Arrange plots in rows.
- Set term values.
- Unlock term values.
- Show all terms.
- Assign values to "Pop Age 0-19 M".
- Assign values to other terms.
Example 31
Summary: Creates a profiler object to analyze population age demographics, specifying response variables and configuring term values for visualization.
Code:
dt under test = Open("data_table.jmp");
obj = Profiler(
Y( :Name( "Pop Age 0-19" ), :Name( "Pop Age 20-59" ), :Name( "Pop Age 60+" ) ),
Profiler(
1,
Arrange in Rows( 4 ),
Term Value(
Name( "Pop Age 0-19 M" )(92500000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 0-19 F" )(100000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 20-59 M" )(40000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 20-59 F" )(40000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 60+ M" )(10000000, Lock( 0 ), Show( 1 )),
Name( "Pop Age 60+ F" )(14000000, Lock( 0 ), Show( 1 ))
)
)
);
Code Explanation:
- Open data table.
- Create profiler object.
- Set response variables.
- Configure profiler settings.
- Arrange terms in rows.
- Set term values.
- Unlock term "Pop Age 0-19 M".
- Unlock term "Pop Age 0-19 F".
- Unlock term "Pop Age 20-59 M".
- Unlock term "Pop Age 20-59 F".
Example 32
Summary: Creates a prediction profiler to analyze data table 'data_table.jmp', utilizing Profiler settings and term values to visualize response, profile, and subject effects.
Code:
dt under test = Open("data_table.jmp");
obj = Profiler(
Y( :Pred Formula Y ),
Profiler(
1,
Profile at Boundary( "Turn at Boundaries" ),
Arrange in Rows( 2 ),
Term Value(
p1( 0.6615, Min( 0.474 ), Max( 0.849 ), Lock( 0 ), Show( 1 ) ),
p2( 0.126, Max( 0.252 ), Lock( 0 ), Show( 1 ) ),
p3( 0.2125, Min( 0.151 ), Max( 0.274 ), Lock( 0 ), Show( 1 ) )
)
)
);
Code Explanation:
- Open data table;
- Create Profiler object.
- Set response variable.
- Configure Profiler settings.
- Enable boundary turning.
- Arrange profiles in 2 rows.
- Set initial term values.
- Define p1 range and lock.
- Define p2 range and lock.
- Define p3 range and lock.
Example 33
Summary: Creates a prediction profiler to analyze data in a table, configuring boundary profiling and term values for p1, p2, and p3.
Code:
dt under test = Open("data_table.jmp");
obj = Profiler(
Y( :Pred Formula Y ),
Profiler(
1,
Profile at Boundary( "Turn at Boundaries" ),
Arrange in Rows( 1 ),
Term Value(
p1( 0.6615, Min( 0.474 ), Max( 0.849 ), Lock( 0 ), Show( 1 ) ),
p2( 0.126, Max( 0.252 ), Lock( 0 ), Show( 1 ) ),
p3( 0.2125, Min( 0.151 ), Max( 0.274 ), Lock( 0 ), Show( 1 ) )
)
)
);
Code Explanation:
- Open table.
- Create profiler object.
- Set response variable.
- Configure profiler settings.
- Set boundary profiling.
- Arrange profiles in rows.
- Define term values.
- Set initial value for p1.
- Set min and max for p1.
- Lock p1 value.
Example 34
Summary: Generates a prediction profiler report from a data table, including bagged predictions and confidence intervals.
Code:
dt = Open("data_table.jmp");
obj = dt << run script( "Model" );
rpt = Report( obj << (Profiler( 1 )) );
scpt = rpt[Outline Box( "Prediction Profiler" )] << get scriptable object;
scpt << Save Bagged Predictions( 2 );
n = dt << Get Column Names( string );
col1 = Contains( n, "Pred Formula Shrinkage Bagged Mean" );
col2 = Contains( n, "Shrinkage Bootstrap Std Err" );
col3 = Contains( n, "StdError Shrinkage Bagged Mean" );
Code Explanation:
- Open data table.
- Run "Model" script on data table.
- Generate report from Profiler.
- Extract Prediction Profiler outline box.
- Get scriptable object from outline box.
- Save bagged predictions for 2 iterations.
- Retrieve all column names from data table.
- Check for "Pred Formula Shrinkage Bagged Mean" column.
- Check for "Shrinkage Bootstrap Std Err" column.
- Check for "StdError Shrinkage Bagged Mean" column.
Example 35
Summary: Runs the simulation and analysis of data table using Profiler, Simulator, and Report features in JMP.
Code:
dt = Open("data_table.jmp");
obj = dt << Profiler(
Y( :Name( "X-formula" ) ),
Profiler(
1,
Simulator( 1, N Runs( 100 ), Factors( year << Random( Normal( 1912.5, 48 ) ) ), Responses( Name( "X-formula" ) << No Noise ) )
),
);
Report( obj )[Outline Box( "Simulate to Table" )][Button Box( 1 )] << Click;
Close( dt, No Save );
dt1 = Current Data Table();
dt1 << Sort( By( :year ), Order( Ascending ) );
Close( dt1, No Save );
dt2 = Current Data Table();
_mat = J( N Rows( dt2 ) - 1, 2, 0 );
_mat[0, 1] = Transpose( Column( dt2, 1 )[2 :: N Rows( dt2 )] - Column( dt2, 1 )[1 :: (N Rows( dt2 ) - 1)] );
_mat[0, 2] = Transpose( Column( dt2, 2 )[2 :: N Rows( dt2 )] - Column( dt2, 2 )[1 :: (N Rows( dt2 ) - 1)] );
Close( dt2, No Save );
::square = 2;
dt1 = New Table( "Table 1",
New Column( "xmat", Set Values( 1 :: 10 ) ),
New Column( "ymat1", Formula( Parameter( {a = 1, b = 1}, a + b * :xmat + :xmat ^ ::square ) ) )
);
obj1 = dt1 << Profiler( Y( :ymat1 ), Profiler( 1 ), Expand );
rpt1 = obj1 << report;
y1 = Num( rpt1[Text Box( 2 )] << get Text );
dt2 = New Table( "Table2",
New Column( "xmat", Set Values( 1 :: 10 ) ),
New Column( "ymat2", ::square = 1, Formula( Parameter( {a = 1, b = 1}, a + b * :xmat + :xmat ^ ::square ) ) )
);
obj2 = dt2 << Profiler( Y( :ymat2 ), Profiler( 1 ), Expand );
rpt2 = obj2 << report;
y2 = Num( rpt2[Text Box( 2 )] << get Text );
dt = New Table( "Test", Add Rows( 100 ), New Column( "A", Formula( Random Normal() ) ) );
dt << New Column( "B", Formula( Summation( i = 1, 7, :A * Random Integer( 2 ) ) ) );
obj = dt << Profiler( Y( :B ), Expand );
obj << Save Expanded Formulas;
_mat = dt << Get as Matrix( {3} );
Code Explanation:
- Open data table.
- Launch Profiler on table.
- Configure Profiler settings.
- Run simulation.
- Close original data table.
- Retrieve simulation results.
- Sort results by year.
- Close sorted data table.
- Calculate differences between rows.
- Create new table with formulas.
Example 36
Summary: Launches a Profiler on selected columns in a JMP data table, adjusting for Firth bias and including likelihood ratio tests.
Code:
dt = Open("data_table.jmp");
obj = dt << Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Desirability Functions( 1 )
);
obj << Unthreaded( 1 );
obj << Save Script to Script Window;
For( ii = 1, ii <= N Items( Window() ), ii++,
If( (Window()[ii] << get window title) == "Script Window",
If( Host is( mac ),
scpt = Trim( Window()[ii][Script Box( 1 )] << get line text( 15 ) ),
scpt = Trim( Window()[ii][Script Box( 1 )] << get line text( 15 ) )
);
Window()[ii] << Close Window;
Break();
)
);
Code Explanation:
- Open data table;
- Launch Profiler on selected columns.
- Set desirability functions.
- Disable threading in Profiler.
- Save Profiler script to Script Window.
- Iterate through open windows.
- Identify Script Window.
- Retrieve script line text.
- Trim retrieved script text.
- Close Script Window.
Example 37
Summary: Creates a Profiler object in JMP, specifying response variables and desirability functions, and saves the script to the Script Window.
Code:
dt = Open("data_table.jmp");
obj = dt << Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Desirability Functions( 1 )
);
obj << Default N Levels( 20 );
obj << Save Script to Script Window;
For( ii = 1, ii <= N Items( Window() ), ii++,
If( (Window()[ii] << get window title) == "Script Window",
If( Host is( mac ),
scpt = Trim( Words( Window()[ii][Script Box( 1 )] << get line text( 10 ), "," )[1] ),
scpt = Trim( Words( Window()[ii][Script Box( 1 )] << get line text( 10 ), "," )[1] )
);
Window()[ii] << Close Window;
Break();
)
);
Code Explanation:
- Open data table;
- Create Profiler object.
- Set response variables.
- Initialize desirability functions.
- Set default number of levels to 20.
- Save script to Script Window.
- Loop through all windows.
- Find Script Window.
- Extract script content.
- Close Script Window.
Example 38
Summary: Creates a profiler object to optimize desirability functions, adjusting for Firth bias and including likelihood ratio tests.
Code:
dt = Open("data_table.jmp");
obj = dt << Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler(
1,
Term Value( SILICA( 1.25, Lock( 0 ), Show( 1 ) ), SILANE( 50, Lock( 0 ), Show( 1 ) ), SULFUR( 2.25, Lock( 0 ), Show( 1 ) ) ),
Remember Settings( "Default" ),
Term Value( SILICA( 1.25, Lock( 0 ), Show( 1 ) ), SILANE( 50, Lock( 0 ), Show( 1 ) ), SULFUR( 2.25, Lock( 0 ), Show( 1 ) ) ),
Desirability Functions( 1 ),
Maximize Desirability,
Remember Settings( "Optimal" ),
)
);
Code Explanation:
- Open data table;
- Create Profiler object.
- Set response variables.
- Configure Profiler settings.
- Lock SILICA term value.
- Lock SILANE term value.
- Lock SULFUR term value.
- Save default settings.
- Maximize desirability functions.
- Save optimal settings.
Example 39
Summary: Runs the simulation and profiling of a formula-based model, generating 100 runs with random normal distribution for the year factor and disabling noise for the response.
Code:
dt = Open("data_table.jmp");
obj = dt << Profiler(
Y( :Name( "X-formula" ) ),
Profiler(
1,
Simulator( 1, N Runs( 100 ), Factors( year << Random( Normal( 1912.5, 48 ) ) ), Responses( Name( "X-formula" ) << No Noise ) )
),
);
Report( obj )[Outline Box( "Simulate to Table" )][Button Box( 1 )] << Click;
Code Explanation:
- Open data table;
- Launch Profiler on X-formula.
- Configure Simulator for 100 runs.
- Set year factor to random normal distribution.
- Disable noise for X-formula response.
- Execute simulation.
- Access Simulate to Table outline.
- Click first button box.
Example 40
Summary: Configures a Profiler object to analyze the ABRASION response variable, adjusting for Firth bias and including likelihood ratio tests.
Code:
dt = Open("data_table.jmp");
obj = Profiler(
Y( :Pred Formula ABRASION ),
Profiler(
1,
Term Value( SILICA( 1.25, Lock( 0 ), Show( 1 ) ), SILANE( 50, Lock( 0 ), Show( 1 ) ), SULFUR( 2.25, Lock( 0 ), Show( 1 ) ) )
)
);
obj << Profiler( Extrapolation Control Option( "On" ) );
obj << Profiler( Extrapolation Control Option( "Warning On" ) );
rpt = obj << report;
Code Explanation:
- Open data table.
- Create a Profiler object.
- Set response variable to ABRASION.
- Configure Profiler settings.
- Set SILICA term value to 1.25.
- Set SILANE term value to 50.
- Set SULFUR term value to 2.25.
- Enable extrapolation control.
- Enable extrapolation warning.
- Generate Profiler report.
Example 41
Summary: Runs the simulation and prediction of material properties using a Profiler object, configuring factors and extracting predictions from the report.
Code:
dt = Open("data_table.jmp");
obj = dt << Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) );
rpt = obj << report;
obj << Simulator(
Factors(
SILICA << Random( Normal( 1.2, 0.2 ) ), SILANE << Random( Normal weighted( 61.6, 3.2 ) ), SULFUR << Random( Lognormal( 1.4, 0.2 ) )
)
);
sim = J( 6, 1, 0 );
sim_parm = J( 3, 2, 0 );
For( i = 1, i <= N Rows( sim ), i++,
sim[i] = rpt[Outline Box( "Prediction Profiler" )][Combo Box( i )] << get
);
For( i = 1, i <= N Rows( sim_parm ), i++,
sim_parm[i, 0] = Transpose( Matrix( rpt[Outline Box( "Prediction Profiler" )][Number Col Edit Box( i )] << get ) )
);
obj << Simulator( 0 );
obj << Simulator(
Factors(
SILICA << Random( JohnsonSb( 0, 1, 0, 1 ) ), SILANE << Random( Triangular( 55.2, 61.6, 68.1 ) ),
SULFUR << Random( Gamma( 1, 1.4 ) )
)
);
sim1 = J( 6, 1, 0 );
For( i = 1, i <= N Rows( sim1 ), i++,
sim1[i] = rpt[Outline Box( "Prediction Profiler" )][Combo Box( i )] << get
);
Code Explanation:
- Open data table;
- Create Profiler object.
- Generate Profiler report.
- Configure Simulator with factors.
- Initialize simulation arrays.
- Extract predictions from Profiler.
- Extract parameters from Profiler.
- Disable current Simulator.
- Reconfigure Simulator with different factors.
- Extract new predictions from Profiler.
Example 42
Summary: Runs the construction of a choice model using Profiler, Responses, and Subjects data tables to specify response, profile, and subject effects, adjusting for Firth bias and including likelihood ratio tests.
Code:
dt = Open("data_table.jmp");
obj = Profiler(
Y( :Time 2sided ),
Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
Receive Application( 13, Min( 7 ), Max( 25 ) ),
Review( 14, Min( 7 ), Max( 25 ) ),
Credit Check( 15, Min( 7 ), Max( 25 ) ),
Loan Finalization( 16, Min( 7 ), Max( 25 ) )
),
Simulator(
1,
Factors(
Receive Application << Random( Normal weighted( 13, 1 ) ), Review << Random( Normal weighted( 14, 2 ) ),
Credit Check << Random( Normal weighted( 15, 3 ) ), Loan Finalization << Random( Normal weighted( 16, 4 ) )
),
Responses( Time 2sided << No Noise ),
Defect Profiler( 1 ),
Defect Parametric Profile( 1 )
)
)
);
Code Explanation:
- Open data table;
- Create Profiler object.
- Set Y variable to "Time 2sided".
- Configure Profiler settings.
- Enable confidence intervals.
- Define term values for four factors.
- Set min and max for each factor.
- Initialize Simulator within Profiler.
- Assign random distributions to factors.
- Enable Defect Profiler and Parametric Profile.
Profiler using Structural Equation Models
Example 1
Summary: Performs a mediation analysis using Structural Equation Models (SEM) to analyze the relationships between Interest, Belonging, and Autonomy variables.
Code:
// SEM: Mediation Analysis
// Open data table
dt = Open("data_table.jmp");
// SEM: Mediation Analysis
Structural Equation Models(
Model Variables(
:Interest, :Belonging, :Autonomy
),
Model Specification(
Model Name( "Model 2" ),
Means(
{"Constant", {:Interest,
:Belonging, :Autonomy}}
),
Regressions(
{:Belonging, {:Autonomy,
:Interest}},
{:Autonomy, {:Interest}}
),
Variances(
{:Interest, {:Interest}},
{:Belonging, {:Belonging}},
{:Autonomy, {:Autonomy}}
)
),
Fit(
Model Name(
"Mediation Analysis"
),
Means(
{"Constant", {:Interest,
:Belonging, :Autonomy}}
),
Regressions(
{:Belonging, {:Autonomy,
:Interest}},
{:Autonomy, {:Interest}}
),
Variances(
{:Interest, {:Interest}},
{:Belonging, {:Belonging}},
{:Autonomy, {:Autonomy}}
),
Prediction Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
:
Belonging(
3.6848,
Lock( 0 ),
Show( 1 )
)
),
Y Terms( Interest )
),
Total Effects( 1 ),
Indirect Effects( 1 ),
Path Diagram Properties(
Show R Squared Values( 1 )
)
)
);
Code Explanation:
- Open data table.
- Define model variables.
- Specify model name.
- Set means for variables.
- Define regressions between variables.
- Set variances for variables.
- Fit mediation analysis model.
- Configure prediction profiler.
- Include confidence intervals.
- Set term values and show predictions.
Example 2
Summary: Runs the specification and fitting of a structural equation model using JMP's Structural Equation Models platform, with means, regressions, and variances defined for Model 2, and prediction profiler enabled for Model 1.
Code:
dt = Open("data_table.jmp");
obj = dt << Structural Equation Models(
Model Variables( :Support_L, :Goal_L, :Work_L ),
Model Specification(
Model Name( "Model 2" ),
Means( {"Constant", {:Support_L, :Goal_L, :Work_L}} ),
Regressions( {:Goal_L, {:Work_L}} ),
Variances( {:Support_L, {:Support_L}}, {:Goal_L, {:Goal_L}}, {:Work_L, {:Work_L}} )
),
Fit(
Model Name( "Model 1" ),
Means( {"Constant", {:Support_L, :Goal_L, :Work_L}} ),
Regressions( {:Goal_L, {:Work_L}} ),
Variances( {:Support_L, {:Support_L}}, {:Goal_L, {:Goal_L}}, {:Work_L, {:Work_L}} ),
Prediction Profiler(
1,
Confidence Intervals( 1 ),
Term Value( new_Goal_L( 6.59, Lock( 0 ), Show( 1 ) ), new_Work_L( 8.81, Lock( 0 ), Show( 1 ) ) ),
Y Terms( Support_L )
)
)
);
Code Explanation:
- Open data_table data
- Define structural equation models.
- Specify model variables.
- Create model specification for Model 2.
- Include means for Model 2.
- Define regressions for Model 2.
- Set variances for Model 2.
- Fit Model 1 using same specifications.
- Enable prediction profiler for Model 1.
- Configure prediction profiler settings.
Profiler using Set Property
Example 1
Summary: Simulates a profiler object to analyze the relationships between ABRASION, MODULUS, ELONG, and HARDNESS factors in a data table, utilizing unthreaded mode and specifying factor distributions.
Code:
Names Default To Here( 1 );
dt = Open("data_table.jmp");
:Pred Formula ABRASION << Set Property( "Spec Limits", {LSL( 110 )} );
:Pred Formula MODULUS << Set Property( "Spec Limits", {LSL( 750 ), USL( 1700 )} );
obj = Profiler(
<<Unthreaded( 1 ),
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Simulator(
1,
Factors( SILICA << Random( Normal( 1.25, 0.3266 ) ), SILANE << Random( Normal weighted( 50, 6.532 ) ), SULFUR << Fixed( 2.25 ) ),
Responses(
Pred Formula ABRASION << No Noise, Pred Formula MODULUS << No Noise, Pred Formula ELONG << No Noise,
Pred Formula HARDNESS << No Noise
),
Defect Profiler( 1 ),
Simulate
),
SendToReport( Dispatch( {"Prediction Profiler", "Simulator"}, "Responses", OutlineBox, {Close( 1 )} ) )
);
Code Explanation:
- Set default names.
- Open data table.
- Set lower spec limit for ABRASION.
- Set lower and upper spec limits for MODULUS.
- Create profiler object.
- Specify unthreaded mode.
- Add response variables.
- Configure simulator settings.
- Define factor distributions.
- Set responses without noise.
- Enable defect profiler.
- Run simulation.
- Close simulator responses report.
Example 2
Summary: Configures spec limits for four response variables (ABRASION, MODULUS, ELONG, and HARDNESS) in a data table, followed by generating 20,000 random samples and creating a 3D scatterplot for three variables.
Code:
dt = Open("data_table.jmp");
dt:Pred Formula ABRASION << Set Property( "Spec Limits", {LSL( 120 ), Show Limits( 1 )} );
dt:Pred Formula MODULUS << Set Property( "Spec Limits", {LSL( 1200 ), Show Limits( 1 )} );
dt:Pred Formula ELONG << Set Property( "Spec Limits", {LSL( 350 ), USL( 500 ), Show Limits( 1 )} );
dt:Pred Formula HARDNESS << Set Property( "Spec Limits", {LSL( 65 ), USL( 75 ), Show Limits( 1 )} );
obj = Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler( 1, Desirability Functions( 1 ) )
);
dtNew = obj << Output Random Table( 20000 );
dtNew << Scatterplot 3D( Y( :SILICA, :SILANE, :SULFUR ) );
Code Explanation:
- Open data table;
- Set LSL for ABRASION.
- Set LSL for MODULUS.
- Set LSL and USL for ELONG.
- Set LSL and USL for HARDNESS.
- Create Profiler object.
- Configure Profiler with four responses.
- Enable Desirability Functions.
- Output 20,000 random samples.
- Generate 3D scatterplot for three variables.
Example 3
Summary: Sets up spec limits for four formulas (ABRASION, MODULUS, ELONG, and HARDNESS) in a data table, followed by generating a 3D scatterplot from a profiler output.
Code:
dt = Open("data_table.jmp");
dt:Pred Formula ABRASION << Set Property( "Spec Limits", {LSL( 120 ), Show Limits( 1 )} );
dt:Pred Formula MODULUS << Set Property( "Spec Limits", {LSL( 1200 ), Show Limits( 1 )} );
dt:Pred Formula ELONG << Set Property( "Spec Limits", {LSL( 350 ), USL( 500 ), Show Limits( 1 )} );
dt:Pred Formula HARDNESS << Set Property( "Spec Limits", {LSL( 65 ), USL( 75 ), Show Limits( 1 )} );
obj = Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler( 1, Desirability Functions( 1 ) )
);
dtNew = obj << Output Random Table( 20000 );
dtNew << Scatterplot 3D( Y( :SILICA, :SILANE, :SULFUR ) );
dtNew << Clear Select;
Code Explanation:
- Open data table;
- Set spec limits for ABRASION.
- Set spec limits for MODULUS.
- Set spec limits for ELONG.
- Set spec limits for HARDNESS.
- Create profiler for four formulas.
- Enable desirability functions in profiler.
- Output random table from profiler.
- Generate 3D scatterplot for new data.
- Clear selection in new data table.
Example 4
Summary: Configures prediction formulas and spec limits for ABRASION, MODULUS, ELONG, and HARDNESS variables in a data table, and applies a custom profiler preset to visualize the predictions.
Code:
dt = Open("data_table.jmp");
dt:Pred Formula ABRASION << Set Property( "Spec Limits", {LSL( 120 ), Show Limits( 0 )} );
dt:Pred Formula MODULUS << Set Property( "Spec Limits", {LSL( 1200 ), Show Limits( 0 )} );
dt:Pred Formula ELONG << Set Property( "Spec Limits", {LSL( 350 ), USL( 500 ), Show Limits( 0 )} );
dt:Pred Formula HARDNESS << Set Property( "Spec Limits", {LSL( 65 ), USL( 75 ), Show Limits( 0 )} );
dt:Pred Formula ABRASION << Set Property( "Predicting", {:ABRASION, Creator( "Fit Least Squares" ), RMSE( 3 )} );
dt:Pred Formula MODULUS << Set Property( "Predicting", {:MODULUS, Creator( "Fit Least Squares" ), RMSE( 100 )} );
dt:Pred Formula ELONG << Set Property( "Predicting", {:ELONG, Creator( "Fit Least Squares" ), RMSE( 10 )} );
dt:Pred Formula HARDNESS << Set Property( "Predicting", {:HARDNESS, Creator( "Fit Least Squares" ), RMSE( .6 )} );
obj_cust = Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler(
1,
Desirability Functions( 0 ),
Term Value( :SILICA( 1.2, Lock( 0 ), Show( 1 ) ), :SILANE( 50, Lock( 0 ), Show( 1 ) ), :SULFUR( 2.3, Lock( 0 ), Show( 1 ) ) ),
Design Space Profiler( Set Limits( :SILICA( 0.82208, 1.72909 ), :SILANE( 43.468, 59.5963 ), :SULFUR( 1.72845, 2.3 ) ) )
),
SendToReport(
Dispatch( {"Prediction Profiler", "Design Space Profiler"}, "DesignSpaceProfiler frame", FrameBox( 2 ), {Frame Size( 136, 120 )} )
)
);
obj = dt << Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) );
preset = obj_cust << New Preset;
obj << Apply Preset( Preset );
Code Explanation:
- Open table.
- Set ABRASION spec limits.
- Set MODULUS spec limits.
- Set ELONG spec limits.
- Set HARDNESS spec limits.
- Configure ABRASION prediction.
- Configure MODULUS prediction.
- Configure ELONG prediction.
- Configure HARDNESS prediction.
- Create custom profiler preset.
- Apply custom profiler preset.
Example 5
Summary: Runs the design space profiler to analyze the ABRASION prediction formula and generates a report with interactive buttons, then selects hidden rows in the data table and sets the Connect Hide Mode.
Code:
dt = Open("data_table.jmp");
dt:Pred Formula ABRASION << Set Property( "Spec Limits", {LSL( 120 ), Show Limits( 1 )} );
obj = dt << Profiler(
Y( :Pred Formula ABRASION ),
Profiler( 1, Desirability Functions( 0 ), Design Space Profiler( 1, Connect to Table( "data_table.jmp" ), Connect Hide Mode ) )
);
rpt = obj << Report();
rpt[Outline Box( "Design Space Profiler" )][Button Box( 1 )] << Click;
rpt[Outline Box( "Design Space Profiler" )][Button Box( 1 )] << Click;
rpt[Outline Box( "Design Space Profiler" )][Button Box( 1 )] << Click;
r = (dt << select hidden) << get selected rows;
scpt = rpt[Outline Box( "Design Space Profiler" )] << get scriptable object;
scpt << Connect Hide Mode( 0 );
r1 = (dt << select hidden) << get selected rows;
Code Explanation:
- Open data table;
- Set property for "Pred Formula ABRASION".
- Create profiler object.
- Generate report from profiler.
- Click button box in report.
- Click button box again.
- Click button box once more.
- Select hidden rows in data table.
- Get scriptable object from report.
- Set Connect Hide Mode to 0.
- Select hidden rows in data table again.
Example 6
Summary: Analyzes and creates reports for ABRASION data by setting property limits, creating a profiler, and generating a report.
Code:
dt = Open("data_table.jmp");
dt:Pred Formula ABRASION << Set Property( "Spec Limits", {LSL( 120 ), Show Limits( 1 )} );
obj = dt << Profiler( Y( :Pred Formula ABRASION ), Profiler( 1, Desirability Functions( 0 ), Design Space Profiler( 1 ) ) );
rpt = obj << Report();
Code Explanation:
- Open data table;
- Set LSL for ABRASION.
- Enable limit display.
- Create Profiler for ABRASION.
- Disable desirability functions.
- Enable design space profiler.
- Generate report.
Example 7
Summary: Runs the specification limits for four quality control metrics (ABRASION, MODULUS, ELONG, and HARDNESS) using Profiler and Simulator in JMP.
Code:
dt = Open("data_table.jmp");
:Pred Formula ABRASION << Set Property( "Spec Limits", {LSL( 110 )} );
:Pred Formula MODULUS << Set Property( "Spec Limits", {LSL( 0 ), USL( 2000 )} );
:Pred Formula ELONG << Set Property( "Spec Limits", {LSL( 350 ), USL( 550 )} );
:Pred Formula HARDNESS << Set Property( "Spec Limits", {LSL( 66 ), USL( 74 )} );
obj = dt << Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler(
1,
Simulator(
1,
Factors(
SILICA << Random( Normal weighted( 1.25, 0.1 ) ), SILANE << Random( Normal weighted( 50, 2 ) ),
SULFUR << Random( Normal weighted( 2.25, 0.15 ) )
),
Set Random Seed( 1 ),
Defect Profiler( 1 ),
Defect Parametric Profile( 1 )
)
)
);
Code Explanation:
- Open data table;
- Set LSL for ABRASION.
- Set LSL and USL for MODULUS.
- Set LSL and USL for ELONG.
- Set LSL and USL for HARDNESS.
- Create Profiler object.
- Add ABRASION, MODULUS, ELONG, HARDNESS to Profiler.
- Configure Profiler settings.
- Enable Simulator within Profiler.
- Define random factors: SILICA, SILANE, SULFUR.
Example 8
Summary: Simulates multiple predictor formulas with random factors and sets spec limits for each formula, utilizing Profiler and Simulator in JMP.
Code:
dt = Open("data_table.jmp");
:Pred Formula ABRASION << Set Property( "Spec Limits", {LSL( 110 )} );
:Pred Formula MODULUS << Set Property( "Spec Limits", {LSL( 750 ), USL( 1700 )} );
:Pred Formula ELONG << Set Property( "Spec Limits", {USL( 600 )} );
:Pred Formula HARDNESS << Set Property( "Spec Limits", {LSL( 65 ), USL( 75 )} );
obj1 = dt << Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler(
1,
Simulator(
1,
Factors(
SILICA << Random( Normal weighted( 1.25, 0.1 ) ), SILANE << Random( Normal weighted( 50, 2 ) ),
SULFUR << Random( Normal weighted( 2.25, 0.15 ) )
),
Set Random Seed( 1 ),
Simulate
)
)
);
Code Explanation:
- Open data table;
- Set LSL for ABRASION.
- Set LSL and USL for MODULUS.
- Set USL for ELONG.
- Set LSL and USL for HARDNESS.
- Create profiler for predictions.
- Add ABRASION, MODULUS, ELONG, HARDNESS to profiler.
- Enable simulator in profiler.
- Define SILICA, SILANE, SULFUR factors with random distributions.
- Set random seed to 1 and run simulation.
Profiler using For Each
Summary: Creates and configures profiler objects for specified columns in a data table, applying presets to generate reports with customizable titles.
Code:
plat_samples = ["Profiler" => {"Simulator", "Optimization", "Exploration", "Variable Importance", "Design Space Profiler"}, => {}];
dt = Open("data_table.jmp");
For Each( {sample}, plat_samples["Profiler"],
obj = dt << Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) );
With Window Handler(
Eval( Eval Expr( obj << Apply Preset( "Sample Presets", Expr( sample ) ) ) ),
Function( {win},
win << Close Window
)
);
obj << Set Report Title( sample );
);
Code Explanation:
- Define presets for profiler.
- Open data table.
- Loop through each preset.
- Create profiler object for specified columns.
- Apply current preset to profiler.
- Handle window events.
- Close profiler window.
- Set report title to current preset name.
- Repeat for all presets.
Profiler using New Column
Example 1
Summary: Fits a standard least squares model with multiple effects and generates a profiler plot to visualize the relationship between height and weight.
Code:
dt = Open("data_table.jmp");
myCol = dt << New Column( "myFormula", formula( :height / :weight ) );
myProfiler = dt << Profiler(
Y( :myFormula ),
Profiler( 1, Interaction Profiler( 1 ), Term Value( height( 61.25, Lock( 0 ), Show( 1 ) ), weight( 120, Lock( 0 ), Show( 1 ) ) ) )
);
Code Explanation:
- Open table.
- Create new column.
- Define formula.
- Launch profiler.
- Set response variable.
- Configure profiler settings.
- Enable interaction profiler.
- Set term values.
- Unlock term height.
- Show term height.
Example 2
Summary: Fits a standard least squares model with multiple effects and generates a profiler plot to visualize the results.
Code:
dt = Open("data_table.jmp");
dt << New Column( "Pred Formula",
formula(
If( :height < 65,
If( :height < 60,
79,
Choose( Match( :age, 12, 1, 13, 1, 14, 2, 15, 2, 16, 2, 17, 2, 3 ), 109.833333333333, 97.1538461538462, 101.157894736842 )
),
123.214285714286
)
)
);
dt << Profiler( Y( :Pred Formula ) );
Code Explanation:
- Open data table.
- Create new column "Pred Formula".
- Define formula for "Pred Formula".
- Use nested If statements for conditions.
- Use Choose function for specific age matching.
- Assign constant values based on conditions.
- End formula definition.
- Launch Profiler.
- Set Y variable to "Pred Formula".
- Display Profiler window.
Example 3
Summary: Creates a new column in a JMP data table with a custom formula, and generates a profiler plot to visualize the results.
Code:
dt = Open("data_table.jmp");
dt << New Column( "Pred Formula",
formula(
If( Is Missing( :height ) | :height < 65,
If( Is Missing( :height ) | :height < 60,
79,
101.157894736842
),
123.214285714286
)
)
);
dt << Profiler( Y( :Pred Formula ) );
Code Explanation:
- Open data table;
- Create new column "Pred Formula".
- Define formula for "Pred Formula".
- Check if height is missing or less than 65.
- If true, check if height is missing or less than 60.
- If true, set "Pred Formula" to 79.
- If false, set "Pred Formula" to 101.157894736842.
- If height is not less than 65, set "Pred Formula" to 123.214285714286.
- Launch Profiler.
- Set "Pred Formula" as Y variable.
Example 4
Summary: Creates a profiler plot for a standard least squares model with multiple effects, utilizing the Profiler platform in JMP.
Code:
dt2 = Open("data_table.jmp");
dt2 << New Column( "temp, sex", nominal, values( J( 15, 1, 0 ) |/ J( 25, 1, 1 ) ) );
dt2 << New Column( "Formula1",
formula( (-100) + Match( :Name( "temp, sex" ), 0, 10, 1, 20, . ) + Match( :sex, "F", 2, "M", -2, . ) + 5 * :height )
);
obj = dt2 << Profiler( Y( :Formula1 ), Surface Profiler( 1 ) );
Code Explanation:
- Open data table.
- Create new column "temp, sex".
- Set column type to nominal.
- Assign values to "temp, sex".
- Create new column "Formula1".
- Define formula for "Formula1".
- Launch Profiler for "Formula1".
- Enable Surface Profiler.
Profiler using Expr
Summary: Executes multiple scripts and profilers in JMP, including RSM for 4 Responses, Neural, and custom profiling with log scale adjustments.
Code:
Open("data_table.jmp");
sProfiler1_expr = Expr(
dt << run script( "RSM for 4 Responses" )
);
sProfiler2_expr = Expr(
dt << run script( "Neural" )
);
sProfiler3_expr = Expr(
dt << Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler(
1,
Term Value( SILICA( 1.25, Lock( 0 ), Show( 1 ) ), SILANE( 50, Lock( 0 ), Show( 1 ) ), SULFUR( 2.25, Lock( 0 ), Show( 1 ) ) )
)
)
);
sProfiler4_expr = Expr(
dt << Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler(
1,
Term Value( SILICA( 1.25, Lock( 0 ), Show( 1 ) ), SILANE( 50, Lock( 0 ), Show( 1 ) ), SULFUR( 2.25, Lock( 0 ), Show( 1 ) ) )
),
SendToReport(
Dispatch( {"Prediction Profiler"}, "10003", ScaleBox, {Scale( "Log" ), Min( 60 ), Max( 80 ), Inc( 1 ), Minor Ticks( 1 )} ),
Dispatch( {"Prediction Profiler"}, "10002", ScaleBox, {Scale( "Log" ), Min( 200 ), Max( 700 ), Inc( 1 ), Minor Ticks( 1 )} ),
Dispatch( {"Prediction Profiler"}, "10001", ScaleBox,
{Scale( "Log" ), Min( 482.825749283043 ), Max( 2367.2124029803 ), Inc( 1 ), Minor Ticks( 1 )}
),
Dispatch( {"Prediction Profiler"}, "10000", ScaleBox,
{Scale( "Log" ), Min( 92.7491640697742 ), Max( 203.924120755593 ), Inc( 1 ), Minor Ticks( 1 )}
)
)
)
);
Code Explanation:
- Open data_table data
- Define sProfiler1_expr.
- Run RSM for 4 Responses script.
- Define sProfiler2_expr.
- Run Neural script.
- Define sProfiler3_expr.
- Create profiler for 4 responses.
- Set term values for silica, silane, sulfur.
- Define sProfiler4_expr.
- Create profiler with log scale adjustments.
Profiler using Run Script
Example 1
Summary: Extracts and compares prediction profiler values from a SEM Path Analysis report, utilizing JMP's Run Script and Report features.
Code:
dt = Open("data_table.jmp");
obj = dt << Run Script( "SEM: Path Analysis No Latent" );
obj << Prediction Profiler( 1, Term Value( Leadership_Avg( 1, Lock( 0 ), Show( 1 ) ) ), Y Terms( Conflict_Avg, Satisfaction_Avg ) );
rpt = Current Report();
x_jmp_mx = rpt[Outline Box( "Prediction Profiler" )][Number Edit Box( 1 )] << get;
y1_jmp_mx = Num( rpt[Outline Box( "Prediction Profiler" )][Text Box( 2 )] << get text );
y1_lower_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 3 )] << get text, "[," )[1] );
y1_upper_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 4 )] << get text, "]" )[1] );
y2_jmp_mx = Num( rpt[Outline Box( "Prediction Profiler" )][Text Box( 6 )] << get text );
y2_lower_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 7 )] << get text, "[," )[1] );
y2_upper_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 8 )] << get text, "]" )[1] );
x_bm_mx = 1;
y1_bm_mx = 5.036488;
y1_lower_bm_mx = 4.433301;
y1_upper_bm_mx = 5.639675;
y2_bm_mx = 2.406151;
y2_lower_bm_mx = 1.884959;
y2_upper_mx = 2.927344;
comp = Round( x_jmp_mx, 3 ) - Round( x_bm_mx, 3 );
comp = Round( y1_jmp_mx, 3 ) - Round( y1_bm_mx, 3 );
comp = Round( y1_lower_jmp_mx, 3 ) - Round( y1_lower_bm_mx, 3 );
comp = Round( y1_upper_jmp_mx, 3 ) - Round( y1_upper_bm_mx, 3 );
comp = Round( y2_jmp_mx, 3 ) - Round( y2_bm_mx, 3 );
comp = Round( y2_lower_jmp_mx, 3 ) - Round( y2_lower_bm_mx, 3 );
comp = Round( y2_upper_jmp_mx, 3 ) - Round( y2_upper_mx, 3 );
Code Explanation:
- Open data table;
- Run SEM Path Analysis script.
- Create Prediction Profiler for variables.
- Retrieve current report object.
- Extract X value from Prediction Profiler.
- Extract Y1 value from Prediction Profiler.
- Extract Y1 lower bound from Prediction Profiler.
- Extract Y1 upper bound from Prediction Profiler.
- Extract Y2 value from Prediction Profiler.
- Extract Y2 lower bound from Prediction Profiler.
- Extract Y2 upper bound from Prediction Profiler.
- Compare extracted values with benchmark values.
- Round comparison results to 3 decimal places.
Example 2
Summary: Extracts and compares prediction profiler values from a SEM path analysis in JMP, utilizing the Run Script and Prediction Profiler features.
Code:
dt = Open("data_table.jmp");
obj = dt << Run Script( "SEM: Path Analysis w/ Latent" );
obj << Prediction Profiler( 1, Term Value( Leadership( 0, Lock( 0 ), Show( 1 ) ) ), Y Terms( Conflict, Satisfaction ) );
rpt = Current Report();
x_jmp_mx = rpt[Outline Box( "Prediction Profiler" )][Number Edit Box( 1 )] << get;
y1_jmp_mx = Num( rpt[Outline Box( "Prediction Profiler" )][Text Box( 2 )] << get text );
y1_lower_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 3 )] << get text, "[," )[1] );
y1_upper_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 4 )] << get text, "]" )[1] );
y2_jmp_mx = Num( rpt[Outline Box( "Prediction Profiler" )][Text Box( 6 )] << get text );
y2_lower_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 7 )] << get text, "[," )[1] );
y2_upper_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 8 )] << get text, "]" )[1] );
x_bm_mx = 0;
y1_bm_mx = 0;
y1_lower_bm_mx = 0;
y1_upper_bm_mx = 0;
y2_bm_mx = 0;
y2_lower_bm_mx = 0;
y2_upper_mx = 0;
comp = Round( x_jmp_mx, 3 ) - Round( x_bm_mx, 3 );
comp = Round( y1_jmp_mx, 3 ) - Round( y1_bm_mx, 3 );
comp = Round( y1_lower_jmp_mx, 3 ) - Round( y1_lower_bm_mx, 3 );
comp = Round( y1_upper_jmp_mx, 3 ) - Round( y1_upper_bm_mx, 3 );
comp = Round( y2_jmp_mx, 3 ) - Round( y2_bm_mx, 3 );
comp = Round( y2_lower_jmp_mx, 3 ) - Round( y2_lower_bm_mx, 3 );
comp = Round( y2_upper_jmp_mx, 3 ) - Round( y2_upper_mx, 3 );
Code Explanation:
- Open data_table data
- Run SEM path analysis script.
- Create prediction profiler.
- Set leadership value to 0.
- Include conflict and satisfaction in Y terms.
- Retrieve current report.
- Extract X value from prediction profiler.
- Extract Y1 value from prediction profiler.
- Extract Y1 lower bound from prediction profiler.
- Extract Y1 upper bound from prediction profiler.
Example 3
Summary: Extracts and compares prediction profiler values from a SEM analysis, utilizing JMP's Run Script feature to execute the 'SEM: Path Analysis w/ Latent' script.
Code:
dt = Open("data_table.jmp");
obj = dt << Run Script( "SEM: Path Analysis w/ Latent" );
obj << Prediction Profiler( 1, Term Value( Leadership( 1, Lock( 0 ), Show( 1 ) ) ), Y Terms( Conflict, Satisfaction ) );
rpt = Current Report();
x_jmp_mx = rpt[Outline Box( "Prediction Profiler" )][Number Edit Box( 1 )] << get;
y1_jmp_mx = Num( rpt[Outline Box( "Prediction Profiler" )][Text Box( 2 )] << get text );
y1_lower_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 3 )] << get text, "[," )[1] );
y1_upper_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 4 )] << get text, "]" )[1] );
y2_jmp_mx = Num( rpt[Outline Box( "Prediction Profiler" )][Text Box( 6 )] << get text );
y2_lower_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 7 )] << get text, "[," )[1] );
y2_upper_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 8 )] << get text, "]" )[1] );
x_bm_mx = 1;
y1_bm_mx = -0.8844;
y1_lower_bm_mx = -1.18402;
y1_upper_bm_mx = -0.58484;
y2_bm_mx = 0.84947;
y2_lower_bm_mx = 0.600728;
y2_upper_mx = 1.098213;
comp = Round( x_jmp_mx, 3 ) - Round( x_bm_mx, 3 );
comp = Round( y1_jmp_mx, 3 ) - Round( y1_bm_mx, 3 );
comp = Round( y1_lower_jmp_mx, 3 ) - Round( y1_lower_bm_mx, 3 );
comp = Round( y1_upper_jmp_mx, 3 ) - Round( y1_upper_bm_mx, 3 );
comp = Round( y2_jmp_mx, 3 ) - Round( y2_bm_mx, 3 );
comp = Round( y2_lower_jmp_mx, 3 ) - Round( y2_lower_bm_mx, 3 );
comp = Round( y2_upper_jmp_mx, 3 ) - Round( y2_upper_mx, 3 );
Code Explanation:
- Open table.
- Run script for SEM.
- Create prediction profiler.
- Extract report.
- Get X value from JMP.
- Get Y1 value from JMP.
- Get Y1 lower bound from JMP.
- Get Y1 upper bound from JMP.
- Get Y2 value from JMP.
- Compare extracted values with benchmark.
Example 4
Summary: Executes a SEM path analysis with latent variables, generating prediction profiler results and extracting relevant values for further analysis.
Code:
dt = Open("data_table.jmp");
obj = dt << Run Script( "SEM: Path Analysis w/ Latent" );
obj << Prediction Profiler(
1,
Term Value( Satisfaction( 0, Lock( 0 ), Show( 1 ) ) ),
Y Terms( General_S, Growth_S, Coworker_S, Supervisor_S )
);
rpt = Current Report();
x_jmp_mx = rpt[Outline Box( "Prediction Profiler" )][Number Edit Box( 1 )] << get;
y1_jmp_mx = Num( rpt[Outline Box( "Prediction Profiler" )][Text Box( 2 )] << get text );
y1_lower_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 3 )] << get text, "[," )[1] );
y1_upper_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 4 )] << get text, "]" )[1] );
y2_jmp_mx = Num( rpt[Outline Box( "Prediction Profiler" )][Text Box( 6 )] << get text );
y2_lower_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 7 )] << get text, "[," )[1] );
y2_upper_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 8 )] << get text, "]" )[1] );
y3_jmp_mx = Num( rpt[Outline Box( "Prediction Profiler" )][Text Box( 10 )] << get text );
y3_lower_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 11 )] << get text, "[," )[1] );
y3_upper_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 12 )] << get text, "]" )[1] );
y4_jmp_mx = Num( rpt[Outline Box( "Prediction Profiler" )][Text Box( 14 )] << get text );
y4_lower_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 15 )] << get text, "[," )[1] );
y4_upper_jmp_mx = Num( Words( rpt[Outline Box( "Prediction Profiler" )][Text Box( 16 )] << get text, "]" )[1] );
x_bm_mx = 0;
y1_bm_mx = 7.645;
y1_lower_bm_mx = 7.471403;
y1_upper_bm_mx = 7.818597;
y2_bm_mx = 6.105;
y2_lower_bm_mx = 5.925154;
y2_upper_mx = 6.284846;
y3_bm_mx = 6.28;
y3_lower_bm_mx = 6.097629;
y3_upper_mx = 6.462371;
y4_bm_mx = 2.9;
y4_lower_bm_mx = 2.723603;
y4_upper_mx = 3.076397;
Code Explanation:
- Open data table.
- Run SEM script.
- Launch Prediction Profiler.
- Set term value for Satisfaction.
- Define Y terms.
- Retrieve current report.
- Extract X value from profiler.
- Extract Y1 value from profiler.
- Extract Y1 lower bound from profiler.
- Extract Y1 upper bound from profiler.
Example 5
Summary: Executes a SEM path analysis with latent variables, generating a prediction profiler for leadership term values and Y terms conflict and satisfaction.
Code:
dt = Open("data_table.jmp");
obj = dt << Run Script( "SEM: Path Analysis w/ Latent" );
obj << Prediction Profiler( 1, Term Value( Leadership( 0, Lock( 0 ), Show( 1 ) ) ), Y Terms( Conflict, Satisfaction ) );
Code Explanation:
- Open data table.
- Run SEM path analysis script.
- Launch prediction profiler.
- Set leadership term value.
- Lock leadership term.
- Show leadership term.
- Select Y terms conflict, satisfaction.
Example 6
Summary: Fits a parametric survival model and generates a distribution profiler with independent uniform inputs, resampled inputs, and dependent resampled inputs.
Code:
dt = Open("data_table.jmp");
obj = dt << Run Script( "Fit Parametric Survival" );
obj << Distribution Profiler( 1, Independent Uniform Inputs( 1 ), Independent Resampled Inputs( 1 ), Dependent Resampled Inputs( 1 ) );
Code Explanation:
- Open data table.
- Run "Fit Parametric Survival" script.
- Launch Distribution Profiler.
- Set first parameter as independent.
- Use uniform distribution for inputs.
- Set second parameter as independent.
- Resample second input.
- Set third parameter as dependent.
- Resample third input.
Profiler using Format
Example 1
Summary: Runs the formatting and profiling of a data table, generating a report with specific text boxes and extracting valid characters from extracted text.
Code:
dt = Open("data_table.jmp");
:Pred Formula ABRASION << Format( "Fixed Dec", 15, 3 );
:Pred Formula MODULUS << Format( "Currency", 15, 5, "Use Thousands separator" );
:Pred Formula ELONG << Format( "Percent", 15, 3 );
:Pred Formula HARDNESS << Format( "Scientific", 5 );
obj = dt << Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler( 1, Term Value( SILICA( 1.25 ), SILANE( 50 ), SULFUR( 2.25 ) ) )
);
rpt = obj << report;
temp = (rpt[Outline Box( "Prediction Profiler" )][Text Box( 2 )] << get text);
validChar1 = Left( Right( temp, 4 ), 1 );
temp = (rpt[Outline Box( "Prediction Profiler" )][Text Box( 4 )] << get text);
validChar2 = Left( temp, 1 );
validChar3 = Left( Right( temp, 6 ), 1 );
temp = (rpt[Outline Box( "Prediction Profiler" )][Text Box( 6 )] << get text);
validChar4 = Right( temp, 1 );
validChar5 = Left( Right( temp, 5 ), 1 );
temp = (rpt[Outline Box( "Prediction Profiler" )][Text Box( 8 )] << get text);
validChar6 = Left( Right( temp, 5 ), 1 );
validChar7 = Substr( Right( temp, 3 ), 1, 2 );
Code Explanation:
- Open data table;
- Format "Pred Formula ABRASION" as fixed decimal.
- Format "Pred Formula MODULUS" as currency.
- Format "Pred Formula ELONG" as percent.
- Format "Pred Formula HARDNESS" as scientific.
- Create profiler for selected columns.
- Set initial term values for profiler.
- Generate profiler report.
- Extract text from specific text boxes.
- Extract valid characters from extracted text.
Example 2
Summary: Runs the prediction profiler report generation by formatting specific columns and extracting relevant text, utilizing JMP's Profiler and Report features.
Code:
ut relative epsilon = 1e-9;
dt = Open("data_table.jmp");
:Pred Formula ABRASION << Format( "Fixed Dec", 15, 3 );
:Pred Formula MODULUS << Format( "Currency", 15, 5, "Use Thousands separator" );
:Pred Formula ELONG << Format( "Percent", 15, 3 );
:Pred Formula HARDNESS << Format( "Scientific", 5 );
obj = dt << Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler( 1, Term Value( SILICA( 1.25 ), SILANE( 50 ), SULFUR( 2.25 ) ) )
);
rpt = obj << report;
temp = (rpt[Outline Box( "Prediction Profiler" )][Text Box( 2 )] << get text);
validChar1 = Left( Right( temp, 4 ), 1 );
temp = (rpt[Outline Box( "Prediction Profiler" )][Text Box( 4 )] << get text);
validChar2 = Left( temp, 1 );
validChar3 = Left( Right( temp, 6 ), 1 );
temp = (rpt[Outline Box( "Prediction Profiler" )][Text Box( 6 )] << get text);
validChar4 = Right( temp, 1 );
validChar5 = Left( Right( temp, 5 ), 1 );
temp = (rpt[Outline Box( "Prediction Profiler" )][Text Box( 8 )] << get text);
validChar6 = Left( Right( temp, 5 ), 1 );
validChar7 = Substr( Right( temp, 3 ), 1, 2 );
Code Explanation:
- Set relative epsilon.
- Open data table.
- Format Pred Formula ABRASION.
- Format Pred Formula MODULUS.
- Format Pred Formula ELONG.
- Format Pred Formula HARDNESS.
- Create profiler object.
- Generate profiler report.
- Extract text from Prediction Profiler.
- Extract specific characters from text.
Profiler using Delete Property
Summary: Configures response limits and predicting properties for four formulas in a JMP data table, enabling interactive analysis and visualization.
Code:
dt = Open("data_table.jmp");
dt:Pred Formula ABRASION << Delete Property( "Response Limits" );
dt:Pred Formula MODULUS << Delete Property( "Response Limits" );
dt:Pred Formula ELONG << Delete Property( "Response Limits" );
dt:Pred Formula HARDNESS << Delete Property( "Response Limits" );
dt:Pred Formula ABRASION << Set Property( "Spec Limits", {LSL( 120 ), Show Limits( 1 )} );
dt:Pred Formula MODULUS << Set Property( "Spec Limits", {LSL( 1200 ), Show Limits( 1 )} );
dt:Pred Formula ELONG << Set Property( "Spec Limits", {LSL( 350 ), USL( 500 ), Show Limits( 1 )} );
dt:Pred Formula HARDNESS << Set Property( "Spec Limits", {LSL( 65 ), USL( 75 ), Show Limits( 1 )} );
dt:Pred Formula ABRASION << Set Property( "Predicting", {:ABRASION, Creator( "Fit Least Squares" ), Std Dev( 3 )} );
dt:Pred Formula MODULUS << Set Property( "Predicting", {:MODULUS, Creator( "Fit Least Squares" ), Std Dev( 100 )} );
dt:Pred Formula ELONG << Set Property( "Predicting", {:ELONG, Creator( "Fit Least Squares" ), Std Dev( 10 )} );
dt:Pred Formula HARDNESS << Set Property( "Predicting", {:HARDNESS, Creator( "Fit Least Squares" ), Std Dev( .6 )} );
obj = Profiler(
Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ),
Profiler( 1, Desirability Functions( 1 ) )
);
obj2 = obj << Design Space Profiler;
obj2 << Reset Factor Space( SILICA( 1, 2.0165 ), SILANE( 33.67, 66.33 ), SULFUR( 1.4835, 3.1165 ) );
Code Explanation:
- Open data table;
- Delete Response Limits for ABRASION.
- Delete Response Limits for MODULUS.
- Delete Response Limits for ELONG.
- Delete Response Limits for HARDNESS.
- Set Spec Limits for ABRASION.
- Set Spec Limits for MODULUS.
- Set Spec Limits for ELONG.
- Set Spec Limits for HARDNESS.
- Configure Predicting properties for each response.
Profiler using Associative Array
Example 1
Summary: Executes Response Screening analysis, Profiler, and data table operations to extract PValues tables from a JMP data table.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = Response Screening( Y( :height, ), X( :weight ), PValues Table on Launch( 1 ) );
obj << Save Std Residuals( 1 );
obj = Profiler(
Y( :Std Resid height by weight ),
Profiler( 1, Term Value( height( 61.25, Lock( 0 ), Show( 1 ) ), weight( 120, Lock( 0 ), Show( 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 analysis.
- Save standard residuals.
- Create Profiler for standard residuals.
- Store updated window titles.
- Remove initial window titles from updated list.
- Get remaining window titles.
- Loop through remaining window titles.
- Find and open PValues table.
Example 2
Summary: Executes Response Screening and Profiler analysis, saving outlier indicators and configuring profiler settings.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = Response Screening( Y( :height, ), X( :weight ), PValues Table on Launch( 1 ) );
obj << Save Outlier Indicator( 1 );
obj = Profiler(
Y( :Outlier Indicator height by weight ),
Profiler( 1, Term Value( height( 61.25, Lock( 0 ), Show( 1 ) ), weight( 120, Lock( 0 ), Show( 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.
- Save outlier indicator.
- Create Profiler object.
- Configure Profiler settings.
- Create new associative array of windows.
- Remove initial windows from new array.
- Get keys from new associative array.
- Loop through keys, find "PValues" window.
- Close "PValues" window without saving.
- Close original dataset without saving.
- Set relative epsilon to 1e-10.
Example 3
Summary: Runs a data analysis workflow that performs Response Screening, saves outlier indicators, and generates a profiler for height by weight relationships.
Code:
dt = Open("data_table.jmp");
bef aa = Associative Array( Window() << get window title );
obj = Response Screening( Y( :height, ), X( :weight ), PValues Table on Launch( 1 ) );
obj << Save Outlier Indicator( 1 );
obj = Profiler(
Y( :Outlier Indicator height by weight ),
Profiler( 1, Term Value( height( 61.25, Lock( 0 ), Show( 1 ) ), weight( 120, Lock( 0 ), Show( 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.
- Perform Response Screening analysis.
- Save outlier indicator.
- Create Profiler for outlier indicator.
- Store updated window titles.
- Remove initial window titles from updated list.
- Get remaining window titles.
- Loop through remaining titles.
- Find and store PValues table.