Learn R Programming

Rnets (version 1.2.1)

Clean_Sigma: Clean_Sigma function

Description

Primarily a convenience function, Clean_Sigma estimates a correlation (Sigma) matrix that may contain substantial amounts of missing data and returns it in an easily usable form for the glasso function.

Usage

Clean_Sigma(x, cor_method = "s", cor_pairing = "pair",
  replace.na = TRUE)

Arguments

x

Data used to estimate the correlation matrix.

cor_method

Character indicating method used to estimate correlations. Defaults to Spearman's method. See help file for 'cor' function.

cor_pairing

Character indicating the method used to determine how NA entries are handled. See help file for 'cor' function.

replace.na

Logical. Will replace NAs with 0s if TRUE.