Panel GARCH? (Cermeno and Grier, 2006)
Re: Panel GARCH? (Cermeno and Grier, 2006)
Dear Tom,
I am trying to study the effect of two independent variables (xxx and r) on y by adding them to the mean and variance equations. I added them to the code and coloured them in yellow in the attached file. Is the mean equation correct please with the coefficients and residual? have I added the independent variables correctly to the variance equation please?
Regards
S
I am trying to study the effect of two independent variables (xxx and r) on y by adding them to the mean and variance equations. I added them to the code and coloured them in yellow in the attached file. Is the mean equation correct please with the coefficients and residual? have I added the independent variables correctly to the variance equation please?
Regards
S
- Attachments
-
- Rats with independant.docx
- Adjusted codes
- (18.94 KiB) Downloaded 1374 times
Re: Panel GARCH? (Cermeno and Grier, 2006)
I really can't tell from that. Please provide a mathematical description of the model.
Re: Panel GARCH? (Cermeno and Grier, 2006)
Dear Tom,
Many thanks for you reply.
I have attached a file which has mean, variance and covariance equations. There are three independent variables impact the dependant one.
Best regards
soha
Many thanks for you reply.
I have attached a file which has mean, variance and covariance equations. There are three independent variables impact the dependant one.
Best regards
soha
- Attachments
-
- panel.docx
- (425.73 KiB) Downloaded 1330 times
Re: Panel GARCH? (Cermeno and Grier, 2006)
The description of the covariance matrix in that makes no sense. How can sigma(i,j) depend upon i and not j? (since it has to be symmetric). I would also be rather concerned in practice that the variances themselves have explanatory variables that take both signs (output gap in particular) which could cause the variance to potentially go negative.
Re: Panel GARCH? (Cermeno and Grier, 2006)
Hi,
I have question related to page UG–314 in user guide (ARCH and GARCH).
what does vcs, vas and vbs refer to please? are these only names of coefficients or they have a function in the following code please? Can they be changed to any other names without any effect?
dec symm vcs(n,n) vas(n,n) vbs(n,n)
compute vcs=rr,vas=%const(0.05),vbs=%const(0.80)
nonlin(parmset=garchparms) vcs vas vbs
frml hf = vcs+vas.*uu{1}+vbs.*h{1}
Regards
Soha
I have question related to page UG–314 in user guide (ARCH and GARCH).
what does vcs, vas and vbs refer to please? are these only names of coefficients or they have a function in the following code please? Can they be changed to any other names without any effect?
dec symm vcs(n,n) vas(n,n) vbs(n,n)
compute vcs=rr,vas=%const(0.05),vbs=%const(0.80)
nonlin(parmset=garchparms) vcs vas vbs
frml hf = vcs+vas.*uu{1}+vbs.*h{1}
Regards
Soha
Re: Panel GARCH? (Cermeno and Grier, 2006)
That's for a DVECH model of the variance. VCS has the variance constants, VAS the coefficients on the lagged uu', VBS on the lagged covariance matrix. .* is the Hadamard (elementwise) product. So each of those has exactly the same "shape" as the covariance matrix, an N x N symmetric array.
Re: Panel GARCH? (Cermeno and Grier, 2006)
Hi,
I am getting error massage 'SX11. Identifier MEXICOGDP is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>et x22 = Mexicogdp<<<<
If the name isn't mistyped, it's possible that you have a poorly formatted instruction
Common errors are
* a space before the ( in an option field
* a missing space before = in a SET or FRML
* a missing $ at the end of a long line which continues to the next
the name is correctly written and it is as in the excel file and in the same order. Additionally, I am getting this massage for the rest of the series after x22 till x36.
I am not sure why is this massage. I have attached the code with the excel file for my data. Could you please let me know where I am doing the mistake.
Regards
Soha
I am getting error massage 'SX11. Identifier MEXICOGDP is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>et x22 = Mexicogdp<<<<
If the name isn't mistyped, it's possible that you have a poorly formatted instruction
Common errors are
* a space before the ( in an option field
* a missing space before = in a SET or FRML
* a missing $ at the end of a long line which continues to the next
the name is correctly written and it is as in the excel file and in the same order. Additionally, I am getting this massage for the rest of the series after x22 till x36.
I am not sure why is this massage. I have attached the code with the excel file for my data. Could you please let me know where I am doing the mistake.
Regards
Soha
- Attachments
-
- data5.xls
- (99.5 KiB) Downloaded 1384 times
-
- my codee.docx
- (22.11 KiB) Downloaded 1334 times
Re: Panel GARCH? (Cermeno and Grier, 2006)
Your DATA instruction is one very, very, long line. If you have been editing programs in Word, that's a bad idea. You need to break the lines with $ continuations. Instead of
data(format=xls,org=columns) / Argentgdp Austrlgdp Austriagdp Belgiumgdp Boliviagdp Brazilgdp Cameroongdp Chadgdp Colombiagdp CostaRicagdp Ecuadorgdp Egyptgdp Finlandgdp Ghanagdp Greecegdp Guyanagdp Hondurasgdp Icelandgdp Indiagdp Japangdp Malaysiagdp Mexicogdp Nepalgdp Nigeriagdp Perugdp Panamagdp Paraguaygdp Pakistangdp Norwaygdp Philippinesgdp SierraLeonegdp Sudangdp Trinidadgdp USgdp UKgdp Uruguaygdp ArgenLOG AustrliaLOG AustriaLOG BelgiumLOg BoliviaLOG BrazilLOG CameroonLOG ChadLOg ColombiaLOG CostaLOG EcudorLOG EygptLOG FilandLOG GhanaLOG GreeceLOG GuyanaLOG HondrusLOG IcleanLOg IndiaLOG JapanLOG MalysiaLOG MexicoLOG NepalLOG NigeriaLOG NorwayLOG PakistanLOG PanamaLOG ParaguayLOG PeruLOG PhilpinsLOG SierraLenoneLOG SudanLOG TrinidadLOG UKLOG USLOG UruguayLOG
data(format=xls,org=columns) / Argentgdp Austrlgdp Austriagdp Belgiumgdp Boliviagdp Brazilgdp $
Cameroongdp Chadgdp Colombiagdp CostaRicagdp Ecuadorgdp Egyptgdp Finlandgdp Ghanagdp Greecegdp $
Guyanagdp Hondurasgdp Icelandgdp Indiagdp Japangdp Malaysiagdp Mexicogdp Nepalgdp Nigeriagdp Perugdp $
etc.
Also
cal(A) 1960
all 2015
2015 should be written 2015:1. 2015 is a number, 2015:1 is a date.
data(format=xls,org=columns) / Argentgdp Austrlgdp Austriagdp Belgiumgdp Boliviagdp Brazilgdp Cameroongdp Chadgdp Colombiagdp CostaRicagdp Ecuadorgdp Egyptgdp Finlandgdp Ghanagdp Greecegdp Guyanagdp Hondurasgdp Icelandgdp Indiagdp Japangdp Malaysiagdp Mexicogdp Nepalgdp Nigeriagdp Perugdp Panamagdp Paraguaygdp Pakistangdp Norwaygdp Philippinesgdp SierraLeonegdp Sudangdp Trinidadgdp USgdp UKgdp Uruguaygdp ArgenLOG AustrliaLOG AustriaLOG BelgiumLOg BoliviaLOG BrazilLOG CameroonLOG ChadLOg ColombiaLOG CostaLOG EcudorLOG EygptLOG FilandLOG GhanaLOG GreeceLOG GuyanaLOG HondrusLOG IcleanLOg IndiaLOG JapanLOG MalysiaLOG MexicoLOG NepalLOG NigeriaLOG NorwayLOG PakistanLOG PanamaLOG ParaguayLOG PeruLOG PhilpinsLOG SierraLenoneLOG SudanLOG TrinidadLOG UKLOG USLOG UruguayLOG
data(format=xls,org=columns) / Argentgdp Austrlgdp Austriagdp Belgiumgdp Boliviagdp Brazilgdp $
Cameroongdp Chadgdp Colombiagdp CostaRicagdp Ecuadorgdp Egyptgdp Finlandgdp Ghanagdp Greecegdp $
Guyanagdp Hondurasgdp Icelandgdp Indiagdp Japangdp Malaysiagdp Mexicogdp Nepalgdp Nigeriagdp Perugdp $
etc.
Also
cal(A) 1960
all 2015
2015 should be written 2015:1. 2015 is a number, 2015:1 is a date.
Re: Panel GARCH? (Cermeno and Grier, 2006)
Dear Tom,
Many thanks for your reply.
I am not sure why when I am saving the RATS file it is going to word file.
I have sorted out the previous error massage by adding $. However, now I am getting the following massage '## REG12. SIGMA Is Singular/Not PSD At Row 36. Too Many Equations for Data Set Size? I have 36 series which represent the dependent variable with 56 observations for each series. Additionally, I have another 36 series to represent the independent variable so I am not sure why its generating this error massage as there are many observations. Can this be sorted out if I add more independent variables.
Regards
Soha
Many thanks for your reply.
I am not sure why when I am saving the RATS file it is going to word file.
I have sorted out the previous error massage by adding $. However, now I am getting the following massage '## REG12. SIGMA Is Singular/Not PSD At Row 36. Too Many Equations for Data Set Size? I have 36 series which represent the dependent variable with 56 observations for each series. Additionally, I have another 36 series to represent the independent variable so I am not sure why its generating this error massage as there are many observations. Can this be sorted out if I add more independent variables.
Regards
Soha
Re: Panel GARCH? (Cermeno and Grier, 2006)
I think you're missing the point. Adding explanatory variables doesn't make things better---it makes things worse. You have 56 observations, but you lose 3 to lags, so make that 53. SUR estimates (which is what NLSYSTEM is doing) use an unconstrained estimate of the covariance matrix of the residuals. That's a 36 x 36 matrix estimated with 53 observations on residuals which are themselves not full rank because of the degrees of freedom lost because of the estimated parameters. While theoretically, that's (barely) enough data to get a positive definite covariance matrix, in practice, it really isn't because SUR estimates with a nearly singular covariance matrix are extremely unstable. The "GARCH" part of the C-G model doesn't change the problem with this, because it also is freely estimating a 36 x 36 (symmetric) matrix of the cross effects, which is almost certainly too much for the amount of data that you have. (Count only the y observations---36 x 53 is all you have).
Note that the model you're estimating has a fixed intercept with individual specific slope coefficients. That's the exact opposite of the Cermeno-Grier model, which has fixed slopes and individual specific intercepts. Whether fixed slopes will work with such a disparate group of country data isn't clear---have you tried doing some more standard panel techniques to see how similar those are? Is there any strong reason to believe that these series have GARCH effects at all? Annual data usually don't.
Note that the model you're estimating has a fixed intercept with individual specific slope coefficients. That's the exact opposite of the Cermeno-Grier model, which has fixed slopes and individual specific intercepts. Whether fixed slopes will work with such a disparate group of country data isn't clear---have you tried doing some more standard panel techniques to see how similar those are? Is there any strong reason to believe that these series have GARCH effects at all? Annual data usually don't.
Re: Panel GARCH? (Cermeno and Grier, 2006)
You sent the program in a .docx, and RATS doesn't either read or write those, so you must have put it through some program other than RATS.soha wrote:Dear Tom,
Many thanks for your reply.
I am not sure why when I am saving the RATS file it is going to word file.
Re: Panel GARCH? (Cermeno and Grier, 2006)
Dear Tom,
what piters=10,method=bfgs,iters=400 in the code refer to please and how we decide them (10,400)? is there any specific way to choose them please?
Regards
s
what piters=10,method=bfgs,iters=400 in the code refer to please and how we decide them (10,400)? is there any specific way to choose them please?
Regards
s
Re: Panel GARCH? (Cermeno and Grier, 2006)
You're actually not taking enough of the options. The controls for optimization are:
pmethod=simplex,piters=10,method=bfgs,iters=400
This is covered in the User's Guide, both in Chapter 4 (the general chapter on optimization) and in Chapter 9 (the chapter on GARCH). PMETHOD and PITERS go together, as do METHOD and ITERS.
pmethod=simplex,piters=10,method=bfgs,iters=400
This is covered in the User's Guide, both in Chapter 4 (the general chapter on optimization) and in Chapter 9 (the chapter on GARCH). PMETHOD and PITERS go together, as do METHOD and ITERS.
Re: Panel GARCH? (Cermeno and Grier, 2006)
Dear Tom,
I am running the code but getting t-statistic too large for delta, lambda, gamma and rho. I have attached the code and the results files in case I have done any mistake.
Additionally, if I want to cancel coefficients of b and it (independent variable) from the variance equation, how can I do this please. it keeps appearing in the variance equation,.
Regards
I am running the code but getting t-statistic too large for delta, lambda, gamma and rho. I have attached the code and the results files in case I have done any mistake.
Additionally, if I want to cancel coefficients of b and it (independent variable) from the variance equation, how can I do this please. it keeps appearing in the variance equation,.
Regards
Last edited by soha on Thu Feb 14, 2019 4:08 am, edited 1 time in total.
Re: Panel GARCH? (Cermeno and Grier, 2006)
That's not converging. (There's a reason all of that is IN CAPITAL LETTERS)
MAXIMIZE - Estimation by BFGS
NO CONVERGENCE IN 10 ITERATIONS
LAST CRITERION WAS 0.0000000
SUBITERATIONS LIMIT EXCEEDED.
ESTIMATION POSSIBLY HAS STALLED OR MACHINE ROUNDOFF IS MAKING FURTHER PROGRESS DIFFICULT
TRY HIGHER SUBITERATIONS LIMIT, TIGHTER CVCRIT, DIFFERENT SETTING FOR EXACTLINE OR ALPHA ON NLPAR
RESTARTING ESTIMATION FROM LAST ESTIMATES OR DIFFERENT INITIAL GUESSES MIGHT ALSO WORK
The other variables aren't entering your variance equation, just the mean. I have no idea what the VDS and VGS parameters are supposed to be doing, but they aren't actually doing anything other than make it impossible to fit the model.
Even with the restrictions, that's a very complicated model for that amount of data. Do you really believe that the dynamics for (say) Mexico and Nepal are similar enough that you can include them both in this model?
Note that the Cermeño-Grier model is covered in detail in the 2nd edition of the GARCH e-course.
MAXIMIZE - Estimation by BFGS
NO CONVERGENCE IN 10 ITERATIONS
LAST CRITERION WAS 0.0000000
SUBITERATIONS LIMIT EXCEEDED.
ESTIMATION POSSIBLY HAS STALLED OR MACHINE ROUNDOFF IS MAKING FURTHER PROGRESS DIFFICULT
TRY HIGHER SUBITERATIONS LIMIT, TIGHTER CVCRIT, DIFFERENT SETTING FOR EXACTLINE OR ALPHA ON NLPAR
RESTARTING ESTIMATION FROM LAST ESTIMATES OR DIFFERENT INITIAL GUESSES MIGHT ALSO WORK
The other variables aren't entering your variance equation, just the mean. I have no idea what the VDS and VGS parameters are supposed to be doing, but they aren't actually doing anything other than make it impossible to fit the model.
Even with the restrictions, that's a very complicated model for that amount of data. Do you really believe that the dynamics for (say) Mexico and Nepal are similar enough that you can include them both in this model?
Note that the Cermeño-Grier model is covered in detail in the 2nd edition of the GARCH e-course.