plot_density function

Function to plot the sparsity levels for estimated model parameters

Function to plot the sparsity levels for estimated model parameters

A function to plot lineplot for sparsity levels of estimated model parameters

plot_density(est_mats, threshold = 0.1)

Arguments

  • est_mats: A list of numeric matrices, the length of list equals to the number of estimated segments
  • threshold: A numeric value, set as a threshold, the function only counts the non-zeros with absolute magnitudes larger than threshold

Returns

A plot for sparsity density across over all estimated segments

Examples

set.seed(1) est_mats <- list(matrix(rnorm(400, 0, 2), 20, 20), matrix(rnorm(400), 20, 20)) plot_density(est_mats, threshold = 0.25)
  • Maintainer: Yue Bai
  • License: GPL-2
  • Last published: 2024-06-15

Useful links