os_pca | R Documentation |
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.
os_pca(X,D,kappa,M)
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). |
The kappa represents the degree of smoothing. The value of kappa increases, the strength of the smoothing increases.
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
Hiroyuki Yamamoto
Yamamoto H., Nakayama Y., Tsugawa H. (2021) OS-PCA: Orthogonal Smoothed Principal Component Analysis Applied to Metabolome Data, Metabolites, 11(3):149.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.