Description Usage Arguments Value Examples
Shift of an array following a grid pattern.
1 2 3 4 5 6 7 8 9 10 |
X |
Matrix with observations that will be shifted as rows. |
pcaref |
List with the elements of a PCA model:
|
T2.target |
A number indicating the target value for the T^2_A after the shift.
Set to |
SPE.target |
A number indicating the target value for the SPE after the shift.
Set to |
nsteps.t2 |
An integer indicating the number of steps in which the shift from the
reference to the target value of the T^2_A will be performed. Set to |
nsteps.spe |
An integer indicating the number of steps in which the shift from
the reference to the target value of the SPE will be performed. Set to |
gspe |
A number indicating the term that will tune the spacing between steps for the SPE.
Set to |
gt2 |
A number indicating the term that will tune the spacing between steps for the SPE.
Set to |
list with elements:
X
: matrix with the new and shifted data.
SPE
: SPE of each one of the generated outliers in the list element X
.
T2
: T^2 of each one of the generated outliers in the list element X
.
step.spe
: step of each observation according to the shift of the SPE.
step.t2
: step of each observation according to the shift of the T^2.
tag
: is a vector of ones as long as the number of generated observations.
1 2 3 4 5 6 | X <- as.matrix(X)
pcamodel.ref <- pcamb_classic(X, 3, 0.1, "autosc") # PCA-MB with all observations
# Shift a set of observations increasing the T^2 and the SPE in 3 and 2 linear and
# non-linear steps respectively:
outgrid <- scoutgrid(X, pcamodel.ref, T2.target = matrix(40, nrow(X), 1),
SPE.target = matrix(50, nrow(X), 1), nsteps.t2 = 3, nsteps.spe = 2, gspe = 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.