Estimate VAR(1) models by efficiently sampling from the posterior distribution. This provides two graphical structures: (1) a network of undirected relations (the GGM, controlling for the lagged predictors) and (2) a network of directed relations (the lagged coefficients). Note that in the graphical modeling literature, this model is also known as a time series chain graphical model \insertCite abegaz2013sparseBGGM.
var_estimate( Y, rho_sd = sqrt(1/3), beta_sd =1, iter =5000, progress =TRUE, seed =NULL,...)
Arguments
Y: Matrix (or data frame) of dimensions n (observations) by p (variables).
rho_sd: Numeric. Scale of the prior distribution for the partial correlations, approximately the standard deviation of a beta distribution (defaults to sqrt(1/3) as this results to delta = 2, and a uniform distribution across the partial correlations).
beta_sd: Numeric. Standard deviation of the prior distribution for the regression coefficients (defaults to 1). The prior is by default centered at zero and follows a normal distribution \insertCite @Equation 9, @sinay2014bayesianBGGM
iter: Number of iterations (posterior samples; defaults to 5000).
progress: Logical. Should a progress bar be included (defaults to TRUE) ?
seed: An integer for the random seed (defaults to 1).
...: Currently ignored.
Returns
An object of class var_estimate containing a lot of information that is used for printing and plotting the results. For users of BGGM , the following are the useful objects:
beta_mu A matrix including the regression coefficients (posterior mean).