DSGE-VAR likelihood with optimal lambda and fixed lambda

Dear Jpfeifer,

My coauthor and I have been working on estimating a DSGE-VAR, and we happen to notice the some ‘weird’ relationship between lambda and the likelihood that we find hard to understand (In fact, we are trying to trace out how likelihood varies as lambda changes). We wondered if you might know what could have caused that to happen? (We explain the problem in the following; thanks in advance!!!)

Problem (not a bug, so no error message; the codes run well):

When we ESTIMATE lambda as part of the model parameters, the optimal lambda is 0.3321; the corresponding marginal (log) likelihood is 1550.
When we try to SET lambda to higher values (=0.5, =0.75, =1 etc), we can see the likelihood is falling which is what we expected.
But, what is strange and confuses us is that, when we try the lower bound of lambda (=0.3276), it returns a likelihood of 1553.
So why the optimal lambda fails to imply the highest likelihood?

When we estimated the optimal lambda, we did let the lower bound be 0.3276. If lambda=0.3276 does imply the highest likelihood, why does the algorithm fail to find this value but suggests a slightly higher one (0.3321)? At the beginning we thought this might be due to randomness; we then tried to run the same processes for a second time but exactly the same happened. Might you know what is happening here? We really struggle to understand why the optimal lambda is not implying the highest likelihood…

Kind regards,
Zhirong
PS: We attached the .mod file and data just in case.
testdata.rar (4.7 KB)
TestOu6.mod (17.5 KB)

Could you please also provide the mode-file

Dear Jpfeifer,

Many thanks. I added the mode files. The two with ‘min’ are the ones obtained with lambda(min); the other two with ‘optimal’ are ones generated with lambda(estimated).

Zhirong
mode files.rar (27.9 KB)

My guess is that you did not find the proper mode in the first place. I can think of a few reasons why this might go wrong:

1. Looking at your data, there is a weird pattern that looks like a problem with seasonal adjustment.
2. Your mean growth rates in the data are quite different, but you assume them to be cointegrated with the same growth rate. While this is theoretically correct, it can give rise to problems.
3. Your prior for the growth rates has an upper bound of growth of 1 percent per period, but the mean of g_data_GDP is 2.4 percent, which is far away.
4. Your prior for RHO_R and RHO_THETA is weird, because it has its mode at 1, which would be infeasible. Try a different beta distribution that has an interior mode like 0.7, 0.1.

Dear Jpfeifer,

Many thanks for your advice. We will check through what you suggested to see if we could correct it ok.