get_cov_mat: Calculate a covariance matrix

Description Usage Arguments Value

View source: R/glasso_util.R

Description

Calculate a covariance matrix of the design matrix x using one of the methods complete_observations, pairwise_covariance, loh_wainwright_bias_correction or average_imputation.

Usage

1
2
3
get_cov_mat(x, NA_method = c("complete_observations",
  "pairwise_covariance", "loh_wainwright_bias_correction",
  "average_imputation"), min_points = 2)

Arguments

x

A n x p design matrix

NA_method

The method that should be applied to estimate the covariance structure.

min_points

Minimal number of available observations of a variable necessary such that an estimation of the variance of that variable is reliable. An integer not smaller than 2.

Value

A p x p matrix with an estimate for the covariance structure of x. If less than min_points observations are available for some variable, the corresponding rows and columns are NA.


mlondschien/hdcd documentation built on Jan. 5, 2021, 11:26 p.m.