bvar_pd: BVAR-NiW predictive density

Description Usage Arguments Details Value

View source: R/bvar_pd.R

Description

Generates the predictive density for a BVAR model with NiW prior..

Usage

1
bvar_pd(z, y, gamma_n, omega_n, S_n, nu_n, marg = 1, logscale = TRUE)

Arguments

z

A vector of covariates for the observation we wish to predict.

y

A vector of outcome variables, the solution manual if you will.

gamma_n

Posterior mean for the regression coefficients

omega_n

Posterior covariance-matrix for the regression coefficients.

S_n

Part of the posterior of the covariance matrix

nu_n

Part of the posterior of the covariance matrix

marg

Which outcome variable we are interested in, defaults to DGP.

logscale

Whether or not to use logscale. Currently only logscale is available, so defaults to true and trying to change this causes and error.

Details

Generates the one-step ahead predictive distribution for a BVAR model with normal-Wishart prior (or the flat-Jeff prior). Returns the predictive density and mean corresponding to the variable in 'marg'. Density is given on the log scale by default, and the function currenlty does not support non-logscale

Value

A list consisting of the predictive mean and log density of the variable corresponding to 'marg'.


ooelrich/oscbvar documentation built on Sept. 8, 2021, 3:31 p.m.