Description Usage Arguments Details Examples
View source: R/PCC_function_NormalVarianceUnknown.R
PCC_Normal_VarianceUnknown is used to derive the Predictive Control Chart (PCC) for Normal data, when the variance is unknown.
1 2 3 4 5 6 7 | PCC_Normal_VarianceUnknown(data = NULL, historical_data = NULL, ml = NULL,
a0 = 0, b0 = 0, alpha_0 = NULL,
ARL_0 = 370.4, FAP = NULL, FIR = FALSE, fFIR = .99,
aFIR = 1/8, summary_list = TRUE, PCC_PLOT = TRUE, PriorPosterior_PLOT = FALSE,
historical_data_PLOT = FALSE, pdf_report = FALSE,
xlab = "Observation Order", ylab = "Quality characteristic Values",
main = "PCC Normal with unknown variance")
|
data |
vector; a dataset for PCC implementation. Data needs to be in a vector form. |
historical_data |
vector; an optional dataset of historical data. Historical data needs to be in a vector form. |
ml |
scalar; parameter of the likelihood. It is the known mean of the data and needs to be a number. |
a0 |
scalar (positive); hyperparameter of the prior IG(a0, b0). It needs to be a number. The default is 0 and it refers to the initial reference prior IG(0, 0). |
b0 |
scalar (positive); hyperparameter of the prior IG(a0, b0). It needs to be a number. The default is 0 and it refers to the initial reference prior IG(0, 0). |
alpha_0 |
scalar (non negative); It is a power prior parameter controlling the influence of the historical data on the posterior distribution. The default is 1/n_0, where n_0 is the size of the historical data. |
ARL_0 |
scalar (positive); In Control (IC) Average Run Length (ARL). It is average number of IC data points that we will plot in the PCC before a false alarm occurs. The default value is 370.4 |
FAP |
scalar (between 0 and 1); False Alarm Probability (FAP). It is the probability of raising at least one false alarm out of a pre-determined number of N hypothesis tests and it can be used instead of ARL_0. It is based on the Sidak's correction. |
FIR |
logical; If TRUE, then the Fast Initial Response (FIR) PCC is applied, which is an adjustment (narrows the PCC limits) for the initial fisrt tests. |
fFIR |
a number between 0 and 1; It is used if FIR=TRUE. The default value is 0.99 and represents the proportion of the adjusted PCC region over the initial one for the first test. |
aFIR |
non-negative number; It is used if FIR=TRUE. The default value is 0.125 and it is a smoothing parameter for the FIR adjustment. |
summary_list |
logical; If it is TRUE, then a data frame is provided, containing the data sequence, the PCC limits along with the possible occurence of an alarm. It is TRUE by default. |
PCC_PLOT |
logical; if TRUE, the PCC plot is displayed. It is TRUE by default. |
PriorPosterior_PLOT |
logical; if TRUE, the Prior and Posterior distribution(s) of the parameter(s) are displayed. It is TRUE by default. |
historical_data_PLOT |
logical; if TRUE, the historical data are plotted precending the PCC plot. It is FALSE by default. |
pdf_report |
logical; if TRUE then the summary list, PCC plot and Prior/Posterior distribution(s) of the parameter(s) are reported in a pdf file. |
xlab, ylab, main |
The titles of the x-axis, y-axis and the overall title for the PCC plot. The default values are "Observation Order", "Quality characteristic Values" and "PCC Normal with unknown variance" respectively |
PCC_Normal_VarianceUnknown provides the Predictive Control Chart (PCC) process for Normal data, when the variance is unknown. The PCC process is based on the sequential testing of the future observable against the Highest Predictive Density (HPrD), which is obtained by the posterior predictive distribution. The PCC testing starts as early as the second observation.
The initial prior for the unknown variance is an Inverse Gamma: IG(a0, b0). Furthermore, the direct use of available historical data is possible via the power prior, if they are available. In this case, the default value for the power prior parameter alpha_0 is the reciprocal of the length of the historical data, which conveys the weight of a single observation to the prior information. The default prior is the non-informative reference prior IG(0, 0), without the use of historical data.
A FIR option is available by narrowing the first few control limits. The metrics that can be used to control the false alarms tolerance are either ARL_0 or FAP.
1 2 3 4 5 6 7 8 9 | # 30 Normal observations introducing an outlier of 3*sd at the 15th observation
set.seed(1234)
out <- rnorm(30)
out[15] <- out[15] + 3
PCC_Normal_VarianceUnknown(out, ml = 0)
# Real data application
attach(aPTT)
PCC_Normal_VarianceUnknown(data = aPTT_current, historical_data = aPTT_historical, ml = 30)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.