PH1ARMA {PH1XBAR} | R Documentation |
Phase I individual control chart with an ARMA model
Description
Build a Phase I individual control chart for the ARMA models. The charting constant is corrected by this approach.
Usage
PH1ARMA(
X,
cc = NULL,
fap0 = 0.05,
order = c(1, 0, 0),
plot.option = TRUE,
interval = c(1, 4),
case = "U",
phi.vec = NULL,
theta.vec = NULL,
mu0 = NULL,
sigma0 = NULL,
method = "MLE+MOM",
nsim.coefs = 100,
nsim.process = 1000,
burn.in = 50,
sim.type = "Matrix",
standardize = TRUE,
verbose = FALSE
)
Arguments
X |
input and it must be a vector |
cc |
nominal Phase I charting constant. If this is given, the function will not re-compute the charting constant. |
fap0 |
nominal false Alarm Probabilty in Phase I |
order |
order for ARMA model |
plot.option |
- draw a plot for the process; FALSE - Not draw a plot for the process |
interval |
searching range of charting constants for the exact method |
case |
known or unknown case. When case = 'U', the parameters are estimated |
phi.vec |
vector of autoregressive coefficient(s). When case = 'K', the vector needs to be provided with the length same as the first value in the order. If autoregressive coefficents does not present, phi needs to be NULL |
theta.vec |
vector of moving-average coefficient(s). When case = 'K', the vector needs to be provided with the length same as the third value in the order. If moving-average coefficents does not present, theta needs to be NULL |
mu0 |
value of the IC process mean. When case = 'K', the value needs to be provided. |
sigma0 |
value of the IC process standard deviation. When case = 'K', the value needs to be provided. |
method |
estimation method for the control chart. When method = 'MLE+MOM' is maximum likehood estimations plus method of moments. Other options are 'MLE' which is pure MLE and 'CSS' which is pure CSS. |
nsim.coefs |
number of simulation for coeficients. |
nsim.process |
number of simulation for ARMA processes |
burn.in |
number of burn-ins. When burn.in = 0, the simulated process is assumed to be in the initial stage. When burn.in is large enough, the simulated process is assumed to be in the stable stage. |
sim.type |
type of simulation. When sim.type = 'Matrix', the simulation is generated using matrix computation. When sim.type = 'Recursive', the simulation is based on a recursion. |
standardize |
Output standardized data instead of raw data |
verbose |
print diagnostic information about fap0 and the charting constant during the simulations for the exact method |
Value
CL Object type double - central line
gamma Object type double - process variance estimate
cc Object type double - charting constant
order Object type integer - order for ARMA model
phi.vec Object type integer - values of autoregressors
theta.vec Object type integer - values of moving averages
LCL Object type double - lower charting limit
UCL Object type double - upper charting limit
CS Object type double - charting statistic
References
Yao, Y., Chakraborti, S., Yang, X., Parton, J., Lewis Jr, D., and Hudnall, M. (2023). Phase I control chart for individual autocorrelated data: application to prescription opioid monitoring. Journal of Quality Technology, 55(3), 302-317.
Examples
# load the data in the package as an example
data(preston_data)
# set number of simulations
nsim.process <- 10
nsim.coefs <- 10
# An example using the default setting whose fap0 = 0.1
PH1ARMA(preston_data, nsim.process = nsim.process, nsim.coefs = nsim.coefs)
# When users get an error message about the size of matrix,
# the function needs to use the alternative simulation type as follows
PH1ARMA(preston_data, fap0 = 0.05,
nsim.process = nsim.process, nsim.coefs = nsim.coefs, sim.type = 'Recursive')