Using the robsel package

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

This vignette illustrate the basic usage of the robsel package to estimate of the regularization parameter for Graphical Lasso.

Data

We use a 100-by-5 matrix from generate from normal distribution.

x <- matrix(rnorm(100*5),ncol=5)

Using robsel functions

Estimate of the regularization parameter for Graphical Lasso

The function robsel estimates $\lambda$, a regularization parameter for Graphical Lasso at a prespecified confidence level $\alpha$.

library(robsel)
lambda <- robsel(x)
lambda

Graphical Lasso algorithm with $\lambda$ from Robust Selection

The function robsel.glasso returns estimates a sparse inverse covariance matrix using Graphical Lasso with regularization parameter estimated from Robust Selection

A <- robsel.glasso(x)
A

Use RobSel with multiple prespecified confidence levels

We can use multiple $\alpha$ simultaneously with Robust Selection

alphas <- c(0.1, 0.5, 0.9)
lambdas <- robsel(x, alphas)
lambdas
robsel.fits <- robsel.glasso(x, alphas)
robsel.fits


Try the robsel package in your browser

Any scripts or data that you put into this service are public.

robsel documentation built on May 25, 2021, 5:08 p.m.