impute_block: Constructs an overall matrix, then applies a given imputation...

Description Usage Arguments Value Author(s)

View source: R/ruvimpute.R

Description

Constructs an overall matrix, then applies a given imputation function.

Usage

1
2
3
4
5
6
7
8
impute_block(
  Y21,
  Y31,
  Y32,
  impute_func,
  impute_args = list(),
  do_variance = FALSE
)

Arguments

Y21

A matrix of size k by m

Y31

A matrix of size (n - k) by m

Y32

A matrix of size (n - k) by (p - m)

impute_func

A function that takes as input a matrix names Y that has missing values and returns a matrix called Yhat of the same dimension of Y with the missing values filled in. If do_variance = TRUE, then impute_func should also return sig_diag — a vector of column-specific variance estimates. The default is a wrapper for softImpute. I provide a few functions in this package. knn_wrapper performs k-nearest-neighbors imputation. missforest_wrapper performs random forest imputation. softimpute_wrapper performs nuclear norm minimization imputation.

impute_args

A list of additional parameters to pass to impute_func.

do_variance

A logical. Does impute_func also return estimates of the column-specific variances?

Value

Y22 A matrix of size k by (p - m). This is the imputed submatrix.

sig_diag If do_variance = FALSE, then this is NULL. Else, it is a vector of column-specific variance estimates.

Author(s)

David Gerard


dcgerard/vicar documentation built on July 7, 2021, 1:08 p.m.