Page 3 of 4

Re: VAR with time-varying parameters and stochastic volatili

Posted: Fri Apr 24, 2015 8:05 am
by Nord1
Dear estima team,

How to calculate the marginal likelihood in order to choose the optimum lag for the TVP-VAR model??

looking forward for your feedback,

Re: VAR with time-varying parameters and stochastic volatili

Posted: Fri Apr 24, 2015 8:44 am
by tclark
I would suggest using a search engine to investigate the research literature on the calculation of the the marginal likelihood for VARs with TVP and stochastic volatility, such as Primiceri (2005, RESTUD) and Fuentes-Albero and Melosi (2013, J. of Econometrics). With these models, estimating the marginal likelihood is challenging. I am not aware of any existing RATS code for the calculations.

Re: VAR with time-varying parameters and stochastic volatili

Posted: Fri Apr 24, 2015 8:51 am
by Nord1
Do you suggest an alternative approach for choosing the lag in the TVP-VAR models? How to calculate BIC or AIC for this model?

Re: VAR with time-varying parameters and stochastic volatili

Posted: Mon Sep 07, 2015 8:10 pm
by NgocAnh
Dear estima team,

I follow Primiceri(2005) and want to get the impulse response across time (point estimate) for simultaneous response, response after 10 quaters,.. like Primiceri did. As now in the code, I only get the impulse response for specific time like 1975:1, 1981:3,...
Can you help me with the code or show me which way to get the series I want?

Thank you so much.

Best regards
Ngoc Anh

Re: VAR with time-varying parameters and stochastic volatili

Posted: Mon Oct 05, 2015 8:03 am
by Nord1
Hello,

Do you suggest a robustness test for the TVP VAR models?? how to integrate it with the codes??

regards,

Re: VAR with time-varying parameters and stochastic volatili

Posted: Wed Jun 01, 2016 3:59 am
by MM72
a basic question on the code; is it robust to different number of endogenous variables (in my case, four) and adding dummies as exogenous variables (in my case, the exogenous part would be a n x 4 matrix rather than a n x 1 vector).

thanks in advance!

Re: VAR with time-varying parameters and stochastic volatili

Posted: Wed Jun 01, 2016 6:36 am
by tclark
The estimation procedure is written for a general number of variables. You specify the number of variables with the data of the vec[ser] y that holds the data to be used in estimation. That should be transparent in the code and documentation. However, adding deterministic variables beyond the constant would require you to revise (in a significant way, although not in a difficult way for those with RATS coding expertise) portions of the estimation procedure to generalize to not simply assume an intercept as the only deterministic term.

Re: VAR with time-varying parameters and stochastic volatili

Posted: Sun Dec 11, 2016 2:28 pm
by ege_man
Dear Tom
I fixed the problem. I have one more question. Do I have to use levels or first-difference of the variables in the TVP-VAR model? I checked the stationarity the variables are all I(1)

Re: VAR with time-varying parameters and stochastic volatili

Posted: Wed Feb 15, 2017 8:50 am
by linea
Dear Estima team,
could you please help me with the following problem? I am trying to apply the VARTVPKSC.correctedJan2014 procedure on a dataset of my own. I have a 6-variable model with 3 lags. When I try to estimate the model, RATS reproduces the following error: ## MAT14. Non-invertible Matrix. Using Generalized Inverse for SYMMETRIC.
The Error Occurred At Location 8160, Line 496 of VARTVPKSC.

Is there something wrong with the program, or is it merely a consequence of my data? multicollinearity or something like that? would it by advisable to reduce the number of variables?

I am attaching the program, dataset and procedure.

If anyone could help, it would be much appreciated. Thanks.

Re: VAR with time-varying parameters and stochastic volatili

Posted: Wed Feb 15, 2017 1:00 pm
by TomDoan
It looks like that's way too big a model for the amount of data you have. You have to at least trim the number of lags to 2 (and perhaps 1). With six variables and three lags, you have 108 coefficients in the VAR, with only about 100 usable observations. It's drawing a Wishart with too few degrees of freedom to be a proper distribution, so it eventually fails.

Re: VAR with time-varying parameters and stochastic volatili

Posted: Wed Feb 15, 2017 1:08 pm
by tclark
Thanks, Tom. Consistent with your observation, the standard in the research literature (Cogley-Sargent, Primiceri, Benati, others) with these types of models has no more than 3-4 variables and 2 lags. Even if the data technically allow larger models, it is difficult to be able to estimate them.

Re: VAR with time-varying parameters and stochastic volatili

Posted: Fri Feb 17, 2017 8:36 am
by linea
Dear Tom and Todd, thank you both for the quick response.
According to your advice, I trimmed the model to 3 variables and 2 lags.
This time I get the error message ## SR10. Missing Values And/Or SMPL Options Leave No Usable Data Points. Could you please help me?

Just to mention, according to your previous posts on this topic, I have set prenobs =40-fixlags (in my case 40-2=38). I don't know if the error message has anything to do with this.

Again, thank you in advance!

Re: VAR with time-varying parameters and stochastic volatili

Posted: Fri Feb 17, 2017 10:38 am
by TomDoan
You didn't change this to match the new model:

comp nvar = 6 ;* number of variables in VAR

Also, you must have done a global replace, because you have

VARTVPKSC.correctedJan2014(...)

rather than @VARTVPKSC to execute the procedure.

Re: VAR with time-varying parameters and stochastic volatili

Posted: Fri Feb 17, 2017 12:53 pm
by linea
Yes, thanks, there seem to be now errors now. But, Todd has previously stated that the January2014 version corrects for some bugs from the original program version (as quoted below)
tclark wrote:I'm sorry for the problems. There was in fact an error in the procedure file in a failure to initialize the volatility draws before the Gibbs loop (it didn't show up when I first tested another version of the program for reasons no one cares to know). This version fixes the problem. In addition, the first error in running the program was due to not accounting for model lags in defining the number of observations for the training sample estimation. In your original program, given your available sample, prenobs needs to be defined as 40-fixlags.
Additionally, the original VARTVPKSC procedure (if I understand correctly) does not take into account the Negro and Primiceri (2015, Rev Econ Stud) correction, right? How would one then estimate the corrected version of the model (if not by applying VARTVPKSC.correctedJan2014)?

Re: VAR with time-varying parameters and stochastic volatili

Posted: Mon Feb 20, 2017 7:24 am
by tclark
If you actually look inside the procedure file, in the version notes near the top of the file, you will see a note that indicates that estimation procedure incorporates the algorithm correction pointed out by Del Negro and Primiceri.