robust_sparse_precision: Robustly estimate a precision matrix with a given adjacency...

Description Usage Arguments Details Value Examples

View source: R/cor_mat_estimators.R

Description

The function uses the GLASSAO algorithm implemented in the glassoFast package to estimate a precision matrix robustly with a conditional independence structure specified by adj_mat.

Usage

1
robust_sparse_precision(x, adj_mat, sparse = TRUE)

Arguments

x

An n x p data matrix where each row is an observation vector.

adj_mat

A p x p adjacency matrix. See details.

sparse

A logical specifying whether the returned estimate should be a sparse matrix from the Matrix package or not.

Details

The function adjacency_mat can be used to generate an adjacency matrix from a list containing the neighbours of variable i in list[[i]]. Moreover, the functions banded_neighbours, lattice_neighbours, random_neighbours can be used to generate such lists of neighbours for banded, lattice and random adjacency structures.

Value

A precision matrix.

Examples

1
2

Tveten/capacc documentation built on Sept. 29, 2021, 5:31 a.m.