inverse_prob_method: Inverse probability weighted method for estimating the top K...

Description Usage Arguments Value Examples

View source: R/code_full_new.R

Description

Inverse probability weighted method for estimating the top K eigenspaces

Usage

1
inverse_prob_method(X, K, trace.it = F, center = T, normalize = F)

Arguments

X

a numeric matrix with NAs or "Incomplete" matrix object (see softImpute package)

K

the number of principal components of interest

trace.it

report the progress if trace.it == TRUE

center

center each column of X if center == TRUE. The default value is TRUE.

normalize

normalize each column of X such that its sample variance is 1 if normalize == TRUE. The default value is False.

Value

Columnwise centered matrix of the same dimension as X.

Examples

1
2
3
4
X <- matrix(1:30 + .1 * rnorm(30), 10, 3)
X[1, 1] <- NA
X[2, 3] <- NA
v_hat <- inverse_prob_method(X, 1)

primePCA documentation built on Aug. 5, 2021, 5:06 p.m.