在Jouchi Nakajima的《Time-Varying Parameter VAR Modelwith Stochastic Volatility:An Overview of Methodologyand Empirical Applications》有说, The marginal likelihood is estimated for different lag lengths (up to six) and the number of lags is determinedbased on the highest marginal likelihood (see Nakajima, Kasuya, and Watanabe [2009] for the computation ofthe marginal likelihood).
这个帖子中有Joshua Chan and Eric Eisenstat的计算TVP-VAR模型marginal likelihood值的程序,但现在就是不知道如果要修改滞后阶数应该修改程序的哪里。如果知道修改哪里,就可以通过手动调整滞后阶数来计算不同阶的marginal likelihood,再进行之后阶数的选择。
就像请教一下大家,VP-VAR模型中滞后阶数的选择是不是按照如上的思路,如果是的话,Joshua Chan and Eric Eisenstat的计算TVP-VAR模型marginal likelihood值的程序应该如何修改的呢?