VAR with time-varying parameters and stochastic volatility
Re: VAR with time-varying parameters and stochastic volatili
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,
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
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.
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
Economic Research Dept.
Federal Reserve Bank of Cleveland
Re: VAR with time-varying parameters and stochastic volatili
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
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
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
Hello,
Do you suggest a robustness test for the TVP VAR models?? how to integrate it with the codes??
regards,
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
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!
thanks in advance!
Re: VAR with time-varying parameters and stochastic volatili
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.
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
Economic Research Dept.
Federal Reserve Bank of Cleveland
Re: VAR with time-varying parameters and stochastic volatili
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)
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
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.
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.
- Attachments
-
- repPrimiceri.prg
- program
- (21.21 KiB) Downloaded 1275 times
-
- VARTVPKSC.correctedJan2014.src
- procedure
- (31.51 KiB) Downloaded 1211 times
-
- data_x.xls
- dataset
- (70.5 KiB) Downloaded 957 times
Re: VAR with time-varying parameters and stochastic volatili
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
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.
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
Economic Research Dept.
Federal Reserve Bank of Cleveland
Re: VAR with time-varying parameters and stochastic volatili
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!
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!
- Attachments
-
- data_x.xls
- (65.5 KiB) Downloaded 912 times
-
- repPrimiceri.prg
- (21.21 KiB) Downloaded 1176 times
-
- VARTVPKSC.correctedJan2014.src
- (31.51 KiB) Downloaded 1202 times
Re: VAR with time-varying parameters and stochastic volatili
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.
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
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)
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)?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.
Re: VAR with time-varying parameters and stochastic volatili
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.
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
Economic Research Dept.
Federal Reserve Bank of Cleveland