NPMVCP: Nonparametric Multivariate Change Point Model

Description Usage Arguments Details Value Examples

Description

Computes control chart values for Nonparametric Multivariate Change Point Model

Usage

1
NPMVCP(X)

Arguments

X

A matrix containing observed process readings. Each row represents a single realization of a random vector.

Details

Computes control chart value for nonparametric multivariate change point model.

Value

A data frame containing original data vectors, control chart values (Rmax), and estimated shift location (tauhat).

Examples

 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
31
32
33
34
library(NPMVCP)
data("Alsmelterdata")
output <- NPMVCP(Alsmelterdata)

# p = dimension of each data vector #
p <- ncol(Alsmelterdata)

# c = degree of quarantine #
c <- 15

# N = total number of observation vectors #
N <- nrow(Alsmelterdata)

# set monitoring start value #
monitoring.start <- max(p + 10, 2*c + 3)

# load control limits #
CLdatastring <- paste("CLp", p, "c", c, sep="")
data(list=CLdatastring)
CL <- get(CLdatastring)[,"0.002"]

# extrapolate control limits beyond n = 500, if necessary #
nmax <- N-(monitoring.start-1)
if (nmax > 500) {
    ninv <- 1/(100:500)
    CLexmodel <- lm(CL[100:500] ~ ninv)
    CL <- c(CL, pmax(CL[500], CLexmodel$coef[1] + CLexmodel$coef[2]*(1/(501:nmax))))
}

# adjust index of control limit vector for plotting #
CLtoplot <- c(rep(NA, monitoring.start-1), CL[1:(N-(monitoring.start-1))])

## Not run: plot(output$Rmax, ylim=c(0, 24), type="b")
## Not run: lines(CLtoplot)

NPMVCP documentation built on May 2, 2019, 2:56 a.m.

Related to NPMVCP in NPMVCP...