scoutsimple {SCOUTer} | R Documentation |
scoutsimple
Description
Shift of an array with a single step.
Usage
scoutsimple(X, pcaref, T2.target = NA, SPE.target = NA)
Arguments
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 |
Value
list with elements:
-
X
: matrix with the new and shifted data. -
SPE
: SPE of each one of the generated outliers in the list elementX
. -
T2
: T^2 of each one of the generated outliers in the list elementX
. -
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.
Examples
X <- as.matrix(X)
pcamodel.ref <- pcamb_classic(X, 3, 0.1, "autosc") # PCA-MB with all observations
# Shift a set of observations increasing only the T^2 in one step:
outsimple <- scoutsimple(X, pcamodel.ref, T2.target = matrix(40, nrow(X), 1))