pca.weight: Weights based on PCA

Description Usage Arguments Examples

View source: R/pca.weight.R

Description

pca.weight produce the coefficients of the first principal compoment

Usage

1
pca.weight(emp.cor)

Arguments

emp.cor

empirical correlation matrix of the dataset

Examples

1
2
3
4
5
library(MASS)
# a three biomarkers dataset generated from independent normal(0,1)
X = mvrnorm(n = 100, mu=rep(0,3), Sigma=diag(3), tol = 1e-6, empirical = FALSE, EISPACK = FALSE)
emp.cor <- cor(X)
pca.weight(emp.cor)

Example output

[1] -0.6823131 -0.6629847  0.3080587

mdw documentation built on July 1, 2020, 10:27 p.m.

Related to pca.weight in mdw...