PH1XBAR: Build Phase I X-bar control chart with a corrected charting...

View source: R/PH1XBAR.R

PH1XBARR Documentation

Build Phase I X-bar control chart with a corrected charting constant

Description

Build a Phase I Shewhart control chart for the variance components model if the data are subgrouped or for the basic Shewhart model if the data are individual. The charting constant is correted by this approach.

Usage

PH1XBAR(
	X
	,cc = NULL
	,fap0 = 0.1
	,var.est = c('S', 'MR')
	,ub.option = TRUE
	,method = c('exact', 'BA')
	,plot.option = TRUE
	,interval = c(1, 5)
	,nsim = 10000 
  	,verbose = FALSE
)

Arguments

X

input and it must be a matrix

cc

nominal Phase I charting constant. If this is given, the function will not recompute the charting constant.

fap0

nominal false Alarm Probabilty in Phase 1

var.est

'S' - use mean-square-based estimator, 'MR' - use moving-range-based estimator

ub.option

TRUE - the standard deviation estimator corrected by a unbiasing constant. For MS, it is c4 and for MR, it is d2. FALSE - no unbiasing constant

method

'exact' - calculate results using the exact method, 'BA' - calculate results using the Bonfferoni approximation

plot.option

TRUE - draw a plot for the process; FALSE - Not draw a plot for the process

interval

searching range of charting constants for the exact method

nsim

number of simulation for the exact method

verbose

print diagnostic information about fap0 and the charting constant during the simulations for the exact method

Value

Object of type list. A named list with the following objects:

CL

Object type double - central line

var.est

Object type double - variance estimate

ub.cons

Object type double - unbiasing constant

cc

Object type double - charting constant

m

Object type integer - number of observations

nu

Object type integer - degrees of freedom

lambda

Object type integer - chi-squared unbiasing constant

LCL

Object type double - lower charting limit

UCL

Object type double - upper charting limit

CS

Object type double - charting statistic

Examples


set.seed(12345)

# load the data in the package as an example
data(grinder_data)

# An example using a false alarm probability of 0.05, and 10 simulations
PH1XBAR(grinder_data, fap0 = 0.05, nsim=10, verbose=TRUE)


bolus123/PH1XBAR documentation built on Nov. 12, 2023, 6:21 a.m.