lvglasso: Estimate Gaussian Graphical Models with Latent Variables

Description Usage Arguments Details Value References Examples

View source: R/lvglasso.R

Description

Estimate Gaussian graphical models with latent variables using the method in Chandrasekaran et al. (2012).

Usage

1
lvglasso(data, n, p, lambda1, lambda2, rule = "AND")

Arguments

data

data set, can be a matrix or data frame with n rows and p columns.

n

the number of observations.

p

the number of observed variables.

lambda1

tuning parameter that encourages estimated graph to be sparse. Lambda1 is proportional to lambda2.

lambda2

tuning parameter that encourages the matrix K_{O,H} (K_H)^{-1} K_{H, O} to be low rank, where K_H and K_{O,H} quantify the dependecies among the latent variables and between the observed variables and latent variables, respectively. The matrix K_{O,H} (K_H)^{-1} K_{H, O} summarizes the impact of marginalization over the latent variables.

rule

rules to combine the inverse covariance matrices. Options are "AND" and "OR". Default is "AND".

Details

The lvglasso method assumes that all the variables, both observed and latent, are jointly Gaussian, and specifies the conditional distribution of observed variables on the latent variables by a graphical model. Under the high-dimentional setting, this method provides consistent estimators for the conditional graphical model of observed variables conditioned on latent variables.

Value

omega

a matrix that encodes the conditional dependence relationships between sets of two observed variables

theta

the adjacency matrix with 0 and 1 encoding conditional independence and dependence between sets of two observed variables, respectively

penalties

the penalty values

References

Chandrasekaran, V., Parrilo, P. A. & Willsky, A. S. (2012), ‘Latent variable graphical model selection via convex optimization’, Ann. Statist. 40(4), 1935–1967.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#Gaussian distribution with "AND" rule
n <- 50
R <- 20
p <- 30
l <- 2
s <- 2
data <- generate_Gaussian(n, R, p, l, s, sparsityA = 0.95, sparsityobserved = 0.9,
sparsitylatent = 0.2, lwb = 0.3, upb = 0.3, seed = 1)$X

result <- lvglasso(data, n, p, lambda1 = 0.222, lambda2 = 0.1*0.222, rule = "AND")

latentgraph documentation built on Dec. 15, 2020, 5:23 p.m.