Type: | Package |
Title: | Maxwell Control Charts |
Version: | 0.0.3 |
Maintainer: | Zsolt T. Kosztyan <kosztyan.zsolt@gtk.uni-pannon.hu> |
Description: | Computes Control limits, coefficients of control limits, various performance metrics and depicts control charts for monitoring Maxwell-distributed quality characteristics. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Encoding: | UTF-8 |
LazyData: | true |
URL: | https://github.com/kzst/mxcc |
Depends: | R (≥ 4.00), chi, stats, shotGroups, graphics |
RoxygenNote: | 7.3.2 |
NeedsCompilation: | no |
Packaged: | 2025-06-13 10:02:47 UTC; kzst |
Author: | Zahid Khan [aut], Zsolt T. Kosztyan [aut, cre] |
Repository: | CRAN |
Date/Publication: | 2025-06-13 10:20:02 UTC |
Failure Time of Vertical Boring Machine
Description
This dataset contains the failure times (in hours) of a vertical boring machine, used to illustrate the control chart for monitoring the Maxwell distribution parameter.The data was originally reported by Krishna and Malik (2012).
Usage
data("failure_time")
Format
A data frame consisted of 8 sample batches each wiht 4 observations.
Details
The failure times in this dataset are organized into 8 subgroups, each containing 4 observations. The failure times are measured in hours. These data are used to construct control charts for monitoring the scale parameter of the Maxwell distribution.
Source
Krishna, H. and Malik, M. (2012) "Reliability estimation in Maxwell distribution with progressively Type-II censored data". Journal of Statistical Computation and Simulation, 82(4), pp.623–641. <doi:10.1080/00949655.2010.550291>
References
Hossain, M.P., Omar, M.H. and Riaz, M. (2017) "New V control chart for the Maxwell distribution". Journal of Statistical Computation and Simulation, 87(3), pp.594-606. <doi:10.1080/00949655.2016.1222391>
Examples
data("failure_time")
failure_time
Computation of ARL Curves for V chart and VSQ chart
Description
It calculates the Average Run Length (ARL) for either the V or VSQ control charts, based on the specified sample size, shift constant, and false alarm probability. The user can choose between the two types of control charts.
Usage
mxarl(n = 1, delta = seq(1, 3, length.out = 100), alpha = 0.0027, type = "V")
Arguments
n |
A numeric vector specifying the sample sizes. Default is |
delta |
A numeric vector specifying the shift constants for the control chart. Default is |
alpha |
A numeric value specifying the significance level (false alarm probability). Default is |
type |
A character string specifying the type of chart to be used. Can be either |
Details
This function computes the Average Run Length (ARL) for both V and VSQ control charts by calculating the power and ARL values for the given sample sizes and shift constants
Value
A plot showing the ARL curves for the specified sample sizes and shift constants
Author(s)
Zahid Khan
References
Hossain, M.P., Omar, M.H. and Riaz, M. (2017) "New V control chart for the Maxwell distribution". Journal of Statistical Computation and Simulation, 87(3), pp.594-606. <doi:10.1080/00949655.2016.1222391>
Shah, F., Khan, Z., Aslam, M. and Kadry, S. (2021) "Statistical Development of the VSQ‐Control Chart for Extreme Data with an Application to the Carbon Fiber Industry". Mathematical Problems in Engineering, 2021(1), p.9766986. <doi:10.1155/2021/9766986>
See Also
Examples
mxarl(n= c(5,10), delta = seq(1, 3, length.out = 100), alpha = 0.0027, type = "V")
Determination of Probability Limit Coefficients for V and VSQ Charts for Maxwell-Distributed Quality Characteristics
Description
The function mxk
calculates the coefficients for V and VSQ control charts used to monitor the scale parameter of Maxwell-distributed quality characteristics. It computes two coefficients based on the chosen chart type. For the V chart, the function returns L1
and L2
, while for the VSQ chart, it returns P1
,P2
,P3
and P4
.The coefficients P3
and P4
are used in case of estimated scale parameter value.These coefficients are utilized to construct a probability limits-based control chart.
Usage
mxk(n = 1, alpha = 0.0027, type = "V")
Arguments
n |
Sample size. The number of observations in each subgroup (numeric). Defaults to |
alpha |
Probability of false alarm (Type I error). Defaults to |
type |
The type of chart. Accepts either |
Details
The mxk
function calculates the coefficients used in V and VSQ control charts for monitoring the scale parameter of Maxwell-distributed data. The user must specify the sample size n
, the probability of a false alarm alpha
, and the type of chart ("V"
or "VSQ"
). By default, n
is set to 1, and alpha
is set to 0.0027.
Value
Depending on the type
of chart:
L1 |
Coefficient L1 for the V chart. |
L2 |
Coefficient L2 for the V chart. |
P1 |
Coefficient P1 for the VSQ chart. |
P2 |
Coefficient P2 for the VSQ chart. |
P3 |
Coefficient P3 for the VSQ chart. |
P4 |
Coefficient P4 for the VSQ chart. |
Author(s)
Zahid Khan
References
Hossain, M.P., Omar, M.H. and Riaz, M. (2017) "New V control chart for the Maxwell distribution". Journal of Statistical Computation and Simulation, 87(3), pp.594-606. <doi:10.1080/00949655.2016.1222391>
Shah, F., Khan, Z., Aslam, M. and Kadry, S. (2021) "Statistical Development of the VSQ‐Control Chart for Extreme Data with an Application to the Carbon Fiber Industry". Mathematical Problems in Engineering, 2021(1), p.9766986. <doi:10.1155/2021/9766986>
Examples
mxk(n = 4, alpha = 0.0027, type = "VSQ")
Determination of K-sigma limit Coefficients for V and VSQ Charts for Maxwell-Distributed Quality Characteristics
Description
This function calculates the K-sigma multiplier (L) for control chart based on the specified type: V chart or VSQ chart. The calculation is based on the sample size and the false alarm probability.This multiplier can further be used in the construction of coefficients W1
and W2
for the V chart and coefficients W1
,W2
,W3
and W4
for the VSQ chart.
Usage
mxm(n = 1, alpha = 0.0027, type = "V")
Arguments
n |
Sample size used in the chart. Default is 1. |
alpha |
False alarm probability. Default is 0.0027. |
type |
The type of control chart. Can be "V" for V chart or "VSQ" for VSQ chart. Default is "V". |
Details
The function computes the K-sigma multiplier for either V chart or VSQ chart based on the specified type. If the type is "V", it uses the gamma distribution with the specified parameters. If the type is "VSQ", it uses the ch distribution. The output is the L value that represent multiplier in the K-sigma control limits for the respective chart.
Value
Returns the K-sigma multiplier (L) as a numeric value
Author(s)
Zahid Khan
References
Hossain, M.P., Omar, M.H. and Riaz, M. (2017) "New V control chart for the Maxwell distribution". Journal of Statistical Computation and Simulation, 87(3), pp.594-606. <doi:10.1080/00949655.2016.1222391>
Shah, F., Khan, Z., Aslam, M. and Kadry, S. (2021) "Statistical Development of the VSQ‐Control Chart for Extreme Data with an Application to the Carbon Fiber Industry". Mathematical Problems in Engineering, 2021(1), p.9766986. <doi:10.1155/2021/9766986>
Examples
mxm(n = 5, alpha = 0.005, type = "V")
Power Computation of V Chart and VSQ Chart for Maxwell-Distributed Quality Characteristics
Description
The mxp
function calculates the power of V chart and VSQ control chart for monitoring the Maxwell scale parameter. It computes the probability of detecting a shift in the process, depending on the specified sample size, significance level, and the shift magnitude
Usage
mxp(n = 1, alpha = 0.0027, delta = 1, type)
Arguments
n |
The sample size for each subgroup (Integer). Default is |
alpha |
Probability of false alarm (type I error) for the control chart(numeric). Default is |
delta |
The shift constant representing the magnitude of the shift to detect(numeric). Default is |
type |
Specifies the type of control chart to be used. Options are |
Details
The function calculates the power of a control chart based on the provided sample size (n
), false alarm probability (alpha
), and shift constant (delta
). The chart type, either "V"
or "VSQ"
, determines which chart is used for the calculations. Power is a critical metric that evaluates the sensitivity of the control chart to detecting process shifts, allowing users to monitor for deviations from the expected process behavior.
Value
A numeric value representing the power of the control chart to detect the process shift.
Author(s)
Zahid Khan
References
Hossain, M.P., Omar, M.H. and Riaz, M. (2017) "New V control chart for the Maxwell distribution". Journal of Statistical Computation and Simulation, 87(3), pp.594-606. <doi:10.1080/00949655.2016.1222391>
Shah, F., Khan, Z., Aslam, M. and Kadry, S. (2021) "Statistical Development of the VSQ‐Control Chart for Extreme Data with an Application to the Carbon Fiber Industry". Mathematical Problems in Engineering, 2021(1), p.9766986. <doi:10.1155/2021/9766986>
Examples
result <- mxp(n = 5, alpha = 0.0027, delta = 2, type = "V")
print(result)
Power Curves Construction for V chart and VSQ chart
Description
This function computes the power curves for V or VSQ control charts based on the Maxwell distribution. It allows the user to analyze the performance of these charts under different sample sizes and shifts in the process parameter.
Usage
mxpw(n = 1, delta = seq(1, 3, length.out = 100), alpha = 0.0027, type = "V")
Arguments
n |
A numeric vector specifying the sample sizes. Default is |
delta |
A numeric vector specifying the shift constants for the control chart. Default is |
alpha |
A numeric value specifying the significance level (false alarm probability). Default is |
type |
A character string specifying the type of chart to be used. Can be either |
Details
This function calculates the power curves for either the V or VSQ control charts, depending on the specified type
parameter. It computes the power values for different sample sizes and shift constants. The function uses the Gamma and Chi distribution functions for the V and VSQ charts, respectively.
Value
The function returns a plot of power curves for the specified control chart type
Author(s)
Zahid Khan
References
Hossain, M.P., Omar, M.H. and Riaz, M. (2017) "New V control chart for the Maxwell distribution". Journal of Statistical Computation and Simulation, 87(3), pp.594-606. <doi:10.1080/00949655.2016.1222391>
Shah, F., Khan, Z., Aslam, M. and Kadry, S. (2021) "Statistical Development of the VSQ‐Control Chart for Extreme Data with an Application to the Carbon Fiber Industry". Mathematical Problems in Engineering, 2021(1), p.9766986. <doi:10.1155/2021/9766986>
See Also
Examples
mxpw(n = c(5,8), alpha = 0.0027, type = "VSQ")
Characteristics of Run Length Distribution for V Chart and VSQ Control Chart
Description
The mxrl
function computes key characteristics of the run length distribution for V and VSQ control charts. It calculates the Average Run Length (ARL), Standard Deviation of the Run Length (SDRL), and Median Run Length (MRL), based on the provided sample size, significance level, shift constant, and control chart type.
Usage
mxrl(n = 1, alpha = 0.0027, delta = 1, type = "V")
Arguments
n |
The sample size for each subgroup (Integer). Default is |
alpha |
Probability of false alarm (type I error) for the control chart(numeric). Default is |
delta |
The shift constant representing the magnitude of the shift to detect(numeric). Default is |
type |
Specifies the type of control chart to be used. Options are |
Details
This function computes the characteristics of the run length distribution for either the V chart or the VSQ chart. The run length distribution is an essential metric in control chart analysis as it quantifies the performance of the control chart in detecting shifts in the process. The ARL is the expected number of samples before an out-of-control signal, SDRL is the standard deviation of the run length, and MRL is the median run length.
Value
A list with the following components:
ARL |
The Average Run Length (ARL). |
SDRL |
The Standard Deviation of the Run Length (SDRL). |
MRL |
The Median Run Length (MRL). |
Author(s)
Zahid Khan
References
Hossain, M.P., Omar, M.H. and Riaz, M. (2017) "New V control chart for the Maxwell distribution". Journal of Statistical Computation and Simulation, 87(3), pp.594-606. <doi:10.1080/00949655.2016.1222391>
Shah, F., Khan, Z., Aslam, M. and Kadry, S. (2021) "Statistical Development of the VSQ‐Control Chart for Extreme Data with an Application to the Carbon Fiber Industry". Mathematical Problems in Engineering, 2021(1), p.9766986. <doi:10.1155/2021/9766986>
Examples
mxrl(n = 2, alpha = 0.005, delta = 1, type = "VSQ")
V chart and VSQ chart Construction for Real Process Control
Description
The mxrpc
function constructs control limits for the V and VSQ control charts using real data. It allows the user to specify the value of alpha
, the type of control limit (Probability Limit Control Chart or K-Sigma Control Chart), and the type of control chart (V or VSQ). The function provides a brief summary of control chart parameters.
Usage
mxrpc(data, alpha = 0.0027, limit = "PCL", chart = "V", summary = FALSE)
Arguments
data |
A data frame containing real-world observations for which the control charts will be constructed. |
alpha |
The false alarm probability for control limit calculation. Default is |
limit |
The type of control limit to be used: either "PCL" for Probability Limit Control Chart or "KCL" for K-Sigma Control Chart. Default is |
chart |
The type of control chart to construct: either "V" for V chart or "VSQ" for VSQ chart. Default is |
summary |
Logical value indicating whether to display a short summary of control chart parameters. Default is |
Details
This function takes a real data set and generates control charts (V or VSQ) based on the specified control limit type (PCL or KCL). When summary = TRUE
, the function outputs a brief summary of the control chart parameters, including the control limits, central line, and the values used for constructing the chart. For a more comprehensive summary and graphical display of the selected chart, users are referred to the summary()
and plot()
functions.
Value
An invisible list containing the following components:
-
v
: A vector of plotting statistics. -
data
: A real input data frame -
LCL
: Lower control limit. -
CL
: Central line. -
UCL
: Upper control limit. -
m
: Number of subgroups. -
n
: Sample size per subgroup. -
sig
: Estimated sigma value. -
limit
: Type of control limit used. -
chart
: Type of control chart constructed.
If summary = TRUE
, the function also prints a textual summary of contructed Maxwell control chart.
Author(s)
Zahid Khan
References
Hossain, M.P., Omar, M.H. and Riaz, M. (2017) "New V control chart for the Maxwell distribution". Journal of Statistical Computation and Simulation, 87(3), pp.594-606. <doi:10.1080/00949655.2016.1222391>
Shah, F., Khan, Z., Aslam, M. and Kadry, S. (2021) "Statistical Development of the VSQ‐Control Chart for Extreme Data with an Application to the Carbon Fiber Industry". Mathematical Problems in Engineering, 2021(1), p.9766986. <doi:10.1155/2021/9766986>
See Also
Examples
mxrpc(data=strength_data, alpha = 0.0027, limit = "PCL", chart = "VSQ",summary=TRUE)
V chart and VSQ chart Construction for Simulated Process Control
Description
This function constructs control limits for the V and VSQ control charts based on probability (PCL) or k-sigma (KCL) limits using simulated data from the Maxwell distribution. The function allows for flexible configuration of control chart types and limit methods.
Usage
mxspc(m = 25, n = 4, alpha = 0.0027, sigma,
limit = "PCL", chart = "V", summary = FALSE)
Arguments
m |
The number of subgroups or samples. Default is |
n |
The size of each sample or subgroup. Default is |
alpha |
The false alarm probability for control limit calculation. Default is |
sigma |
The scale parameter of the Maxwell distribution, which must be provided by the user. |
limit |
The type of control limit to be used: either "PCL" for probability limit control chart or "KCL" for k-sigma limit control chart. Default is |
chart |
The type of control chart to construct: either "V" for V chart or "VSQ" for VSQ chart. Default is |
summary |
Logical value indicating whether to display a summary of control chart parameters. Default is |
Details
The function simulates data from the Maxwell distribution using the provided scale parameter (sigma
) and calculates control limits and plotting statistics for the specified control chart type (V or VSQ). It allows for choosing between probability limit control charts and k-sigma control charts. The function does not generate a plot but returns all necessary values to construct the chart externally.
Value
A list of control chart parameters is returned invisibly, which includes:
-
v
: A vector of plotting statistics. -
a
: The matrix of simulated subgroup data. -
LCL
: The lower control limit (or probability limit). -
CL
: The center line of the control chart. -
UCL
: The upper control limit (or probability limit). -
m
: The number of subgroups. -
n
: The sample size for each subgroup. -
sigma
: The provided scale parameter for the Maxwell distribution. -
limit
: The type of limit used ("PCL" or "KCL"). -
chart
: The type of control chart ("V" or "VSQ").
Author(s)
Zahid Khan
References
Hossain, M.P., Omar, M.H. and Riaz, M. (2017) "New V control chart for the Maxwell distribution". Journal of Statistical Computation and Simulation, 87(3), pp.594-606. <doi:10.1080/00949655.2016.1222391>
Shah, F., Khan, Z., Aslam, M. and Kadry, S. (2021) "Statistical Development of the VSQ‐Control Chart for Extreme Data with an Application to the Carbon Fiber Industry". Mathematical Problems in Engineering, 2021(1), p.9766986. <doi:10.1155/2021/9766986>
See Also
Examples
mxspc(m = 30, n = 4, alpha = 0.0027, sigma = 1777.86,
limit="PCL", chart = "V",summary = TRUE)
Control Chart Plots for Maxwell-based V and VSQ Designs
Description
Constructs control charts for Maxwell-based quality characteristics. This method supports objects of class "mxrpc"
(for real-world data) and "mxspc"
(for simulated data).
Usage
## S3 method for class 'mxrpc'
plot(x, ...)
## S3 method for class 'mxspc'
plot(x, ...)
Arguments
x |
An object of class |
... |
Additional graphical parameters passed to the underlying |
Details
This is an S3 generic plot function with methods for objects of class "mxrpc"
and "mxspc"
.
Value
A control chart is drawn.
Author(s)
Zahid Khan
References
Hossain, M.P., Omar, M.H. and Riaz, M. (2017) "New V control chart for the Maxwell distribution". Journal of Statistical Computation and Simulation, 87(3), pp.594-606. <doi:10.1080/00949655.2016.1222391>
Shah, F., Khan, Z., Aslam, M. and Kadry, S. (2021) "Statistical Development of the VSQ‐Control Chart for Extreme Data with an Application to the Carbon Fiber Industry". Mathematical Problems in Engineering, 2021(1), p.9766986. <doi:10.1155/2021/9766986>
See Also
Examples
t1 <- mxspc(m = 30, n = 4, alpha = 0.0027, sigma = 1777.86,limit="PCL", chart = "V")
plot(t1)
Print Method for Control Chart Objects and Their Summaries
Description
Print methods to display key parameters and summaries for control charts generated using mxrpc
and mxspc
, as well as their corresponding summary objects.
Usage
## S3 method for class 'mxrpc'
print(x, ...)
## S3 method for class 'mxspc'
print(x, ...)
## S3 method for class 'summary.mxrpc'
print(x, ...)
## S3 method for class 'summary.mxspc'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (currently not used). |
Details
These print methods provide structured output for:
Control chart parameters: subgroup size, sample size, control limits (LCL, CL, UCL or PCL), estimated sigma, limit type, and chart type.
Summary statistics for the plotting statistic (e.g., V values).
Summary of either real data (for
mxrpc
) or simulated data (formxspc
).For summary objects (
summary.mxrpc
,summary.mxspc
), control chart parameters and statistical summaries are displayed as formatted data frames.
Value
These functions return their input invisibly after printing the relevant summaries to the console.
Author(s)
Zahid Khan, Zsolt T. Kosztyan
References
Hossain, M.P., Omar, M.H. and Riaz, M. (2017) "New V control chart for the Maxwell distribution". Journal of Statistical Computation and Simulation, 87(3), pp.594-606. <doi:10.1080/00949655.2016.1222391>
Shah, F., Khan, Z., Aslam, M. and Kadry, S. (2021) "Statistical Development of the VSQ‐Control Chart for Extreme Data with an Application to the Carbon Fiber Industry". Mathematical Problems in Engineering, 2021(1), p.9766986. <doi:10.1155/2021/9766986>
Examples
t1 <- mxspc(m = 20, n = 5, alpha = 0.004, sigma = 0.5, limit = "KCL")
print(t1)
print(summary(t1))
Strength Data of Carbon Fiber
Description
This dataset contains the strength measurements of carbon fiber tested under tension at various gauge levels. The data is used to construct control charts for monitoring the scale parameter of the Maxwell distribution in the carbon fiber industry.
Usage
data("strength_data")
Format
A data frame with 12 subgroups each with 5 observations.
Details
he dataset consists of 12 subgroups, each containing 5 measurements of carbon fiber strength. These measurements are used to compute the V-statistic, which is then applied to control charts for monitoring the Maxwell distribution's scale parameter. The data was originally reported by Badar and Priest (1982) and is slightly modified for statistical analysis.
Source
Badar, M. G., & Priest, A. M. (1982). Statistical aspects of fiber and bundle strength in hybrid composites. In "Progress in Science and Engineering Composites ICCM-IV, Tokyo", pp. 1129-1136.
References
Shah, F., Khan, Z., Aslam, M. and Kadry, S. (2021) "Statistical Development of the VSQ‐Control Chart for Extreme Data with an Application to the Carbon Fiber Industry". Mathematical Problems in Engineering, 2021(1), p.9766986. <doi:10.1155/2021/9766986>
Examples
data("strength_data")
strength_data
A Brief Summary of Control Chart Parameters and Data
Description
This function provides a summary for the control charts generated by the
mxrpc
and mxspc
functions. This function also provide a brief summary of data being used for analysis.
Usage
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments passed to the method (currently unused). |
Details
This method returns a list summarizing the control chart parameters such as subgroup size, sample size, control limits (LCL, CL, UCL), and standard deviation. It also includes summary statistics of the plotted statistic and the original or simulated data, depending on the function used.
Value
A list of class summary.mxrpc
or summary.mxspc
, containing the control chart parameters and summary statistics of the data.
References
Hossain, M.P., Omar, M.H. and Riaz, M. (2017) "New V control chart for the Maxwell distribution". Journal of Statistical Computation and Simulation, 87(3), pp.594-606. <doi:10.1080/00949655.2016.1222391>
Shah, F., Khan, Z., Aslam, M. and Kadry, S. (2021) "Statistical Development of the VSQ‐Control Chart for Extreme Data with an Application to the Carbon Fiber Industry". Mathematical Problems in Engineering, 2021(1), p.9766986. <doi:10.1155/2021/9766986>
Examples
# Assuming `t1` is an object returned by the mxspc() function
# Maxwell control chart for simulated data
t1 <- mxspc(m = 40, n = 3, alpha = 0.0027, sigma = 1.5, limit = "KCL")
summary(t1)