EWMA Control Chart
Example 1
Summary: Visualizes an EWMA control chart to monitor the Gap variable over time, with subgroups defined by the Sample variable.
Code:
// EWMA Chart
// Open data table
dt = Open("data_table.jmp");
// EWMA Chart
EWMA Control Chart(
Y( :Gap ),
Subgroup( :Sample )
);
Code Explanation:
- Open data table.
- Create EWMA control chart.
- Set response variable.
- Define subgroup variable.
Example 2
Summary: Visualizes the Gap variable over time using an EWMA Control Chart, with overall mean as target and subgrouping by Date.
Code:
// EWMA Chart
// Open data table
dt = Open("data_table.jmp");
// EWMA Chart
EWMA Control Chart(
Y( :Gap ),
Subgroup( :Date ),
Use Overall Mean for Target( 1 )
);
Code Explanation:
- Open data table.
- Create EWMA chart.
- Set response variable.
- Define subgroup variable.
- Use overall mean as target.
Example 3
Summary: Generates an EWMA Control Chart of Temperature using the provided data table, with Time stamp as the subgrouping variable.
Code:
// EWMA Control Chart of Temp
// Open data table
dt = Open("data_table.jmp");
// EWMA Control Chart of Temp
EWMA Control Chart(
Y( :Temp ),
Subgroup( :Time stamp )
);
Code Explanation:
- Open data table.
- Create EWMA control chart.
- Set Y variable to Temp.
- Use Time stamp for subgrouping.
Example 4
Summary: Creates and configures an EWMA Control Chart for a dataset, including setting variables, grouping by species, centering data, enabling beyond limits testing, and displaying residuals charts.
Code:
dt = Open("data_table.jmp");
obj = dt << EWMA Control Chart(
Y( Sepal Length, Sepal width, Petal length, Petal width ),
Subgroup( :Species ),
Center Data( 1 ),
Test Beyond Limits( 1 ),
Constant Limits( 1 )
);
obj << Show Residuals Chart( 1 );
rpt = obj << report;
obj << Lambda( {.5, 0.4, 0.5, 0.4} );
rpt = obj << report;
Code Explanation:
- Open data table;
- Create EWMA control chart.
- Set variables for analysis.
- Group by species.
- Center data.
- Enable beyond limits test.
- Use constant limits.
- Display residuals chart.
- Update lambda values.
- Generate report again.
Example 5
Summary: Creates and analyzes an EWMA Control Chart for a data table, utilizing subgrouping by operator and specifying constant limits with sigma levels 2 and 3.
Code:
dt = Open("data_table.jmp");
obj = dt << EWMA Control Chart(
Y( Measurement, Standard ),
Subgroup( :Operator ),
Center Data( 1 ),
Constant Limits( 1 ),
Sigma( {2, 3} )
);
obj2 = obj << redo analysis;
rpt = obj2 << report;
Code Explanation:
- Open data table.
- Create EWMA control chart.
- Set measurement and standard.
- Define subgroup by operator.
- Center data enabled.
- Use constant limits.
- Set sigma levels 2 and 3.
- Redo the analysis.
- Generate report.
Example 6
Summary: Creates and configures an EWMA Control Chart for quality control analysis, utilizing a Y variable and subgroup labels.
Code:
dt = Open("data_table.jmp");
obj = EWMA Control Chart( Y( :y ), Subgroup( :Labels ), Test Beyond Limits( 1 ), Sigma( 0.5 ) );
obj << constant limits( 1 );
obj << Reset to Defaults( 1 );
obj << constant limits( 0 );
rpt = obj << report;
Code Explanation:
- Open data table;
- Create EWMA control chart.
- Set Y variable to :y.
- Use :Labels for subgroups.
- Enable test beyond limits.
- Set sigma to 0.5.
- Apply constant limits.
- Reset to default settings.
- Disable constant limits.
- Generate report.
Example 7
Summary: Creates an EWMA control chart for a specified Y variable and subgroup, generating a report and saving summaries to a new table.
Code:
dt = Open("data_table.jmp");
obj = dt << EWMA Control Chart( Y( Part ), Subgroup( :Code ) );
rpt = obj << report;
dtsum = obj << save summaries;
Code Explanation:
- Open data table;
- Create EWMA control chart.
- Set Y variable as "Part".
- Set subgroup variable as "Code".
- Retrieve chart report.
- Save summaries to new table.
Example 8
Summary: Creates an EWMA control chart with amplitude as the Y variable, enabling test beyond limits and using constant limits, generating a report object.
Code:
dt = Open("data_table.jmp");
obj = dt << EWMA Control Chart( Y( amplitude ), Test Beyond Limits( 1 ), Constant Limits( 1 ) );
rpt = obj << report;
Code Explanation:
- Open data table;
- Create EWMA control chart.
- Set Y variable to amplitude.
- Enable test beyond limits.
- Use constant limits.
- Generate report object.
Example 9
Summary: Creates and creates a report for an EWMA control chart for Y4, with centered data and saved summaries.
Code:
dt = Open("data_table.jmp");
obj = dt << EWMA Control Chart( Y( :Y4 ), Center Data( 1 ) );
dtsum = obj << save summaries;
rpt = obj << report;
Code Explanation:
- Open data table.
- Create EWMA control chart for Y4.
- Center data on chart.
- Save summaries from chart.
- Generate report from chart.
Example 10
Summary: Creates an EWMA control chart for subgroup analysis, using Whole Plots as subgroups and variable C2 as Y.
Code:
dt = Open("data_table.jmp");
obj = dt << EWMA Control Chart( Y( :C2 ), Subgroup( :Whole Plots ) );
rpt = obj << report;
Code Explanation:
- Open data table.
- Create EWMA control chart.
- Set Y variable to C2.
- Use Whole Plots for subgroups.
- Generate report object.
Example 11
Summary: Creates an EWMA Control Chart with Group Means, Relative Sizes, Grand Mean, Contributions to Delta Squared, and Delta, including a Residuals Chart.
Code:
dt = Open("data_table.jmp");
obj = dt << EWMA Control Chart(
Y( Group Means, Relative Sizes, Grand Mean, Contributions to Delta Squared, Delta ),
Show Residuals Chart( 1 )
);
rpt = obj << report;
Code Explanation:
- Open data table;
- Create EWMA Control Chart.
- Include Group Means in analysis.
- Include Relative Sizes in analysis.
- Include Grand Mean in analysis.
- Include Contributions to Delta Squared in analysis.
- Include Delta in analysis.
- Enable Residuals Chart.
- Retrieve chart report.
- Assign report to variable rpt.
Example 12
Summary: Creates an EWMA control chart for the Gap variable, with constant limits and ARL display.
Code:
dt = Open("data_table.jmp");
obj = dt << EWMA Control Chart( Y( :Gap ), Show ARL( 1 ), Constant Limits( 1 ) );
rpt = obj << report;
Code Explanation:
- Open table.
- Create EWMA control chart.
- Set Y variable.
- Show ARL.
- Use constant limits.
- Generate report object.
Example 13
Summary: Creates and configures an EWMA control chart, enabling beyond limits testing and generating a report object.
Code:
dt = Open("data_table.jmp");
obj = dt << EWMA Control Chart( Y( :y ), Subgroup( :Labels ), Test Beyond Limits( 1 ) );
dt << Delete Columns( dt, "Labels" );
obj << Lambda( .5 );
rpt = obj << report;
Code Explanation:
- Open data table.
- Create EWMA control chart.
- Set subgroup variable.
- Enable beyond limits test.
- Remove Labels column.
- Set lambda value.
- Generate report object.
Example 14
Summary: Creates an EWMA control chart for a subset of rows in a data table, with interactive features to exclude and hide specific rows.
Code:
dt = Open("data_table.jmp");
obj = dt << EWMA Control Chart( Y( :Weight 2 ), Subgroup( :Sample ), Show Excluded Region( 1 ) );
dt << select rows( {29, 30, 31, 32} ) << exclude << hide;
rpt = obj << report;
Code Explanation:
- Open data table.
- Create EWMA control chart.
- Select specific rows.
- Exclude selected rows.
- Hide excluded rows.
- Generate report object.
Example 15
Summary: Creates an EWMA control chart for population analysis, utilizing the Y variable '2010 Population' and subgroup variable 'Change in Population', then deletes the original columns.
Code:
dt = Open("data_table.jmp");
obj = dt << EWMA Control Chart( Y( :"2010 Population"n ), Subgroup( :Change in Population ) );
dt << delete columns( "2010 Population", "Change in Population" );
Code Explanation:
- Open data table.
- Create EWMA control chart.
- Set Y variable.
- Set subgroup variable.
- Delete original columns.
Example 16
Summary: Creates and updates an EWMA control chart for gap analysis, utilizing subgrouping by date and enabling parameters report.
Code:
dt = Open("data_table.jmp");
obj = dt << EWMA Control Chart( Y( :Gap ), Subgroup( :Date ), Parameters Report( 1 ), Use Overall Mean for Target( 1 ), Center Data( 1 ) );
rpt = obj << report;
obj << Use Overall Mean for Target( 0 );
rpt = obj << report;
Code Explanation:
- Open data table.
- Create EWMA control chart.
- Set Y variable to Gap.
- Set subgroup to Date.
- Enable parameters report.
- Use overall mean for target.
- Center data.
- Generate initial report.
- Disable overall mean for target.
- Generate updated report.
Example 17
Summary: Creates an EWMA control chart for Change in Population, with Y variable set to 2010 Population and subgrouping by Change in Population, while capturing log events.
Code:
dt = Open("data_table.jmp");
obj = dt << EWMA Control Chart( Y( :"2010 Population"n ), Subgroup( :Change in Population ) );
actLog = Log Capture( dt << select all rows << exclude );
Code Explanation:
- Open data table.
- Create EWMA control chart.
- Set Y variable.
- Set subgroup variable.
- Log capture begins.
- Select all rows.
- Exclude selected rows.
- End log capture.
Example 18
Summary: Creates an EWMA control chart with constant limits and test beyond limits, while also hiding and excluding rows, capturing log information, and generating a report.
Code:
dt = Open("data_table.jmp");
obj = dt << EWMA Control Chart( Y( amplitude ), Test Beyond Limits( 1 ), constant limits( 1 ) );
dt << select all rows << hide << exclude;
Log Capture( obj << restart EWMA after empty subgroup );
dt << clear selected rowstates;
rpt = obj << report;
Code Explanation:
- Open data table;
- Create EWMA control chart.
- Apply test beyond limits.
- Use constant limits.
- Select all rows.
- Hide selected rows.
- Exclude hidden rows.
- Log capture on restart.
- Clear selected row states.
- Generate report.
Example 19
Summary: Creates an EWMA Control Chart for monitoring sample data, with customizable Y variable, subgrouping by Age, and sigma value set to 100.
Code:
dt = Open("data_table.jmp");
obj = dt << EWMA Control Chart( Y( :Sample # ), Subgroup( :Age ), Sigma( 100 ) );
obj << Lambda( .4 );
obj << reset to defaults;
rpt = obj << report;
Code Explanation:
- Open data table.
- Create EWMA control chart.
- Set Y variable.
- Set subgroup variable.
- Set sigma value.
- Modify lambda parameter.
- Reset chart to defaults.
- Generate report object.
EWMA Control Chart using N Items
Example 1
Summary: Creates and configures an EWMA control chart for diameter data, generating a report with specified limits and targets.
Code:
dt = Open("data_table.jmp");
beforeItems = N Items( Window() );
obj = dt << EWMA Control Chart( Save Summaries, Y( :Y4 ), Lambda( 0.4462 ), Sigma( 1 ) );
afterItems = N Items( Window() );
Close( dt, no save );
dt = New Table( "Untitled 15",
Add Rows( 30 ),
Set Header Height( 55 ),
New Column( "Sample",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30] )
),
New Column( "Diameter",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[24.05, 23.99, 23.95, 23.93, 23.97, 24.06, 24.06, 24.1, 23.98, 24.03, 23.91, 24.06, 24.05, 23.96, 23.98, 24.06, 24.01, 24,
23.93, 23.92, 24.09, 24.11, 24.05, 23.98, 23.98, 24.06, 24.02, 24.06, 23.97, 23.96]
)
)
);
obj = dt << EWMA Control Chart( Y( :Diameter ), Test Beyond Limits( 1 ), Target( 24.04 ), Sigma( 0.03 ) );
rpt = obj << report;
Code Explanation:
- Open data table;
- Count initial window items.
- Create EWMA control chart for Y4.
- Count final window items.
- Close dataset without saving.
- Create new table "Untitled 15".
- Add 30 rows to new table.
- Set header height to 55.
- Add "Sample" column with values.
- Add "Diameter" column with values.
- Create EWMA control chart for Diameter.
- Generate report from chart.
Example 2
Summary: Creates an EWMA control chart for a specified Y variable, with customizable lambda and sigma values, and saves summaries for further analysis.
Code:
dt = Open("data_table.jmp");
beforeItems = N Items( Window() );
obj = dt << EWMA Control Chart( Save Summaries, Y( :Y4 ), Lambda( 0.4462 ), Sigma( 1 ) );
afterItems = N Items( Window() );
Code Explanation:
- Open data table;
- Count initial window items.
- Create EWMA control chart.
- Specify Y variable as Y4.
- Set lambda value to 0.4462.
- Set sigma value to 1.
- Save summaries for the chart.
- Count final window items.
- Compare item counts before and after.
EWMA Control Chart using Select Rows
Summary: Creates an EWMA control chart from a data table, selecting the first row and excluding it, while setting height as the Y variable and age as the subgroup.
Code:
dt = Open("data_table.jmp");
dt << Select Rows( {1} ) << exclude << hide;
obj = dt << EWMA Control Chart( Y( :height ), Subgroup( :age ) );
dtsum = obj << Save summaries;
Code Explanation:
- Open data table;
- Select first row.
- Exclude selected row.
- Hide excluded row.
- Create EWMA control chart.
- Set height as Y variable.
- Set age as subgroup.
- Save summary data.
- Store summary data table.