Learn R Programming

sparsebnUtils (version 0.0.8)

get.covariance: Covariance and precision matrices

Description

Methods for computing covariance and precision matrices given an estimated directed graph.

Usage

get.covariance(x, data, ...)

get.precision(x, data, ...)

Arguments

x

fitted sparsebnFit or sparsebnPath object.

data

data as sparsebnData object.

...

(optional) additional parameters

Value

Covariance (or precision) matrix as Matrix object.

Details

For Gaussian data, the precision matrix corresponds to an undirected graphical model for the distribution. This undirected graph can be tied to the corresponding directed graphical model; see Sections 2.1 and 2.2 (equation (6)) of Aragam and Zhou (2015) for more details.