os_pca {loadings} | R Documentation |
Orthogonal smoothed principal component analysis
Description
This function performs orthogonal smoothed principal component analysis (OS-PCA). In this function, data matrix is automatically scaled to zero mean and unit variance (i.e. autoscaling) for each variables.
Usage
os_pca(X,D,kappa,M)
Arguments
X |
Data matrix that include variables in each columns. |
D |
Differential matrix. |
kappa |
The smoothing parameter (default : 0.999). |
M |
Averaging matrix for repeated data (default : Identity matrix). |
Details
The kappa represents the degree of smoothing. The value of kappa increases, the strength of the smoothing increases.
Value
The return value is a list object that contains the following elements:
P : A matrix with OS-PC loading in each column
T : A matrix with OS-PC score in each column
MT : A matrix with averaging OS-PC score for repeated data in each column (If not for repeated data, the matrix MT equals to the matrix T)
Q : A matrix with OS-PC loading for auxiliary variable in each column
U : A matrix with OS-PC score for auxiliary variable in each column
Author(s)
Hiroyuki Yamamoto
References
Yamamoto H., Nakayama Y., Tsugawa H. (2021) OS-PCA: Orthogonal Smoothed Principal Component Analysis Applied to Metabolome Data, Metabolites, 11(3):149.
Examples
# metabolic turnover data
data(turnover)
X <- turnover$X
D <- turnover$D
ospca <- os_pca(X,D,0.999)
# metabolome data
data(greentea)
X <- greentea$X
D <- greentea$D
M <- greentea$M
ospca <- os_pca(X,D,0.1,M)