Page 1 of 1

BVAR grid search

Posted: Wed Aug 10, 2016 2:39 am
by paolo.zanghieri
Good morning,
I am trying to estimate a medium size BVAR to forecast a few US variables, using the Sims Zha Normal-Wishart priors. Ad far as I understand the best way to get the hyperpatameters “right” is to run a grid search, finding the combination that maximises the posterior marginal log-likelihood. Writing the loop program is (should be) straightforward, problem is that I need the command to convert the marginal LL, into a scalar, i.e. the equivalent of var.@logl. Any clue?
Thanks a lot
Paolo

Re: BVAR grid search

Posted: Wed Aug 10, 2016 3:31 am
by dakila
Freeze VAR model then get the marginal likelihood.
For example:
freeze(tab01) var01
!mll=@val(tab01(r,c))

Re: BVAR grid search

Posted: Wed Aug 10, 2016 5:05 am
by paolo.zanghieri
It works. Thanks a lot.