Description Usage Arguments Details Value Examples
Projection of X onto a Principal Component Analysis (PCA) model.
1 |
X |
Matrix with observations that will be projected onto the PCA model. |
pcaref |
A list with the elemements of a PCA model:
|
pcame
performs the projection of the data in X onto the PCA model stored as a
list of parameters. It returns the projection of the observations in X, along with the
Squared Prediction Errors (SPE), Hotelling's T^2_A, contribution elements and the
reconstruction of X obtained by the PCA model.
list with elements containing information about X in the PCA model:
Xpreprocessed
: matrix X
preprocessed.
Tscores
: score matrix with the projection of X
on each one of the A PCs.
E
: error matrix with the par of X
not explained by the PCA model.
SPE
: vector with the SPE for each observation of X
.
T2
: vector with the T^_A for each observation of X
.
T2matrix
: matrix with the contributions of each PC to the T^2_A for each observation
of X
.
Xrec
: matrix with the reconstructed part of X
, i.e. the part of X
explained by the PCA model.
1 2 3 4 5 6 7 | X <- as.matrix(X)
pcamodel.ref <- pcamb_classic(X, 3, 0.1, "autosc") # PCA-MB with all observations
pcame(X, pcamodel.ref) # Project all observations onto PCA model of pcamodel.ref
pcamodel.ref <- pcamb_classic(X[1:40,], 2, 0.05, "cent") # PCA-MB with first 40 observations
pcame(X[-c(1:40),], pcamodel.ref) # Project observations not used in PCA-MB onto PCA model
# of pcamodel.ref
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.