Description Usage Arguments Details Value Note Author(s) References See Also Examples
Computes the marginal log likelihood
other posterior fit measures for BVAR, BSVAR, and MSBVAR models fit with
szbvar
, szbsvar
and, msbvar
(and their posterior samplers).
1 | posterior.fit(varobj, A0.posterior.obj=NULL, maxiterbs=500)
|
varobj |
Varies for BVAR, BSVAR, or MSBVAR models.
For a BVAR model, |
A0.posterior.obj |
MCMC Gibbs object for the B-SVAR model A(0)
from |
maxiterbs |
Number of iterations for the bridge sampler for computing the marginal likelihood for MSBVAR models |
Estimates the marginal log likelihood, also known as a log marginal data density for the various models. For the BVAR models, this can be computed in closed form. For the BSVAR models the MCMC data augmentation method of Chib (1995) is employed. For the MSBVAR models, the importance sampler, reciprocal importance sampler, and bridge sampler methods of Fruwirth-Schnatter (2006) are used. Consult these references for details (or look at the source code).
The computations are done using compiled C++ and Fortran code as of version 0.3.0. See the package source code for details about the implementation.
BVAR:
A list of the class "posterior.fit.VAR" that includes the following elements:
data.marg.llf |
Log marginal density, the probability of the data after integrating out the parameters in the model. |
data.marg.post |
Predictive marginal posterior density |
coefficient.post |
Contribution to the posterior fit from the pdf of the coefficients. |
BSVAR:
A list of the class "posterior.fit.BSVAR" that includes the following elements:
log.prior |
Log prior probability |
log.llf |
T x 1 list of the log probabilities for each observation conditional on the parameters. |
log.posterior.Aplus |
Log marginal probability of A(1),...,A(p) conditional on the data and A(0) |
log.marginal.data.density |
Log data density or marginal log likelihood, the probability of the data after integrating out the parameters in the model. |
log.marginal.A0k |
m x 1 list of the log probabilities of each column (corresponding to the equations) of A(0) conditional on the other columns. |
MSBVAR:
A list of the class "posterior.fit.MSBVAR" that includes the following elements:
The log Bayes factor for two model can be computed using the log.marginal.data.density:
log BF = log.marginal.data.density.1 - log.marginal.data.density.2
Note that at present, the scale factors for the BVAR and B-SVAR models
are different (one used the concentrated likelihood, the other does
NOT). Thus, one cannot compare fit measures across the two
functions. To compare a recursive B-SVAR to a non-recursive B-SVAR
model, one should estimate the recursive model with szbsvar
using the appropriate ident
matrix and then call
posterior.fit
on the two B-SVAR models!
Patrick T. Brandt and W. Ryan Davis
Chib, Siddartha. 1995. "Marginal Likelihood from the Gibbs Output." Journal of the American Statistical Association. 90(432): 1313–1321.
Waggoner, Daniel F. and Tao A. Zha. 2003. "A Gibbs sampler for structural vector autoregressions" Journal of Economic Dynamics \& Control. 28:349–366.
Fruhwirth-Schnatter, Sylvia. 2006. Finite Mixture and Markov Switching Models. Springer Series in Statistics New York: Springer., esp. Sections 5.4 and 5.5.
szbvar
,
szbsvar
,
gibbs.A0
,
gibbs.msbvar
, and
print.posterior.fit
for a print method.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.