create_rand_coef_mat function

Creates a random coefficient matrix

Creates a random coefficient matrix

create_rand_coef_mat( k, p, max_abs_eigval = 0.8, sparsity_pattern = c("none", "lasso", "hvar"), sparsity_options = NULL, decay = 0.5, ... )

Arguments

  • k: Number of time series

  • p: Number of lags

  • max_abs_eigval: if < 1, then the VAR will be stable

  • sparsity_pattern: The sparsity pattern that should be simulated. Options are: "none" for a dense VAR, "lasso" for a VAR with random zeroes, and "hvar" for an elementwise hierarchical sparsity pattern

  • sparsity_options: Named list of additional options for when sparsity pattern is lasso or hvar. For lasso the option num_zero

    determines the number of zeros. For hvar, the options zero_min (zero_max) give the minimum (maximum) of zeroes for each variable in each equation, and the option zeroes_in_self (boolean) determines if any of the coefficients of a variable on itself should be zero.

  • decay: How fast should coefficients shrink when the lag increases.

  • ...: Not currently used

Returns

Returns a coefficient matrix in companion form of dimension kpxkp.