Page 2 of 2

Re: Obtain residuals and IRF

Posted: Mon Dec 02, 2013 6:59 am
by arezitis
Dear Tom,
Hello! I would like, once more, to ask for your advice regarding residuals and impulse responses.

Regarding residuals, I would like to thank you, for your help and your suggestions on the autocorrelation test. However, I would like to ask you, since the residuals of a switching model cannot be checked for autocorrelation, heteroskedasticity and normality, then shall we stop writing in the papers that we assume that the residuals are normally distributed without autocorrelation and heterskedasticity. After, a quick check in the literature, I observed that authors declare with their MSVEC model that the residuals are Gaussian. What is your suggestion on this?

Regarding impulse responses, since I am estimating a Markov Switching VEC model with asymmetries, I am trying to estimate non-linear impulse responses using the command FORECAST. I have studied your discussion with nazif on the non-linear IRFs of Balke and Fomby code as well as your discussion with cu_student on an asymmetric error correction model. However, I need your help. I am attaching you the code that I am working on, so as to ask for your suggestion on whether I am on the right path or not. I have used your proposition about definitional identities but I am not sure how to proceed with the rest of the code as is proposed to Balke and Fomby file. The error message I get is: “## SX22. Expected Type EQUATION, Got VECTOR[SERIES[REAL]] Instead. The Error Occurred At Location 186, Line 6 of loop/block”.
Moreover, I would like to ask you, do you think that, I should avoid using the PATH option (or any other) for creating a shock to my model since the asymmetries are already modelled.

Once more, I have a huge inquiry for you. I hope that I will not take much of your time.
I am looking forward to your suggestions. Your help is always valuable to us.

Best Regards.

Re: Obtain residuals and IRF

Posted: Mon Dec 02, 2013 9:36 am
by TomDoan
arezitis wrote:Dear Tom,
Hello! I would like, once more, to ask for your advice regarding residuals and impulse responses.

Regarding residuals, I would like to thank you, for your help and your suggestions on the autocorrelation test. However, I would like to ask you, since the residuals of a switching model cannot be checked for autocorrelation, heteroskedasticity and normality, then shall we stop writing in the papers that we assume that the residuals are normally distributed without autocorrelation and heterskedasticity. After, a quick check in the literature, I observed that authors declare with their MSVEC model that the residuals are Gaussian. What is your suggestion on this?
Not all assumptions used in estimating models are testable. Because the underlying structural residuals aren't observable, even approximately, there is no way to verify their distributional assumptions. You have to check the model in other ways. The standardized predictive residuals do have to be serially uncorrelated with unit (or identity) covariance matrix if the model is correct. However, if that's rejected, you don't know what part of the model is the problem.

Re: Obtain residuals and IRF

Posted: Mon Dec 02, 2013 12:49 pm
by arezitis
I see your point Tom. This I should have figure it out myself. Sorry.

Any suggestions for the code of the impulse responses?

Re: Obtain residuals and IRF

Posted: Mon Dec 02, 2013 7:11 pm
by TomDoan
arezitis wrote:Dear Tom,
Regarding impulse responses, since I am estimating a Markov Switching VEC model with asymmetries, I am trying to estimate non-linear impulse responses using the command FORECAST. I have studied your discussion with nazif on the non-linear IRFs of Balke and Fomby code as well as your discussion with cu_student on an asymmetric error correction model. However, I need your help. I am attaching you the code that I am working on, so as to ask for your suggestion on whether I am on the right path or not. I have used your proposition about definitional identities but I am not sure how to proceed with the rest of the code as is proposed to Balke and Fomby file. The error message I get is: “## SX22. Expected Type EQUATION, Got VECTOR[SERIES[REAL]] Instead. The Error Occurred At Location 186, Line 6 of loop/block”.
Moreover, I would like to ask you, do you think that, I should avoid using the PATH option (or any other) for creating a shock to my model since the asymmetries are already modelled.
You're missing the MODEL option on the FORECAST instruction (so it's trying to read the model information from the supplementary lines). And before you can do that, you have to define the MODEL in the first place as is done in Balke-Fomby.

Re: Obtain residuals and IRF

Posted: Wed Dec 04, 2013 4:59 pm
by arezitis
Ok, Tom. I corrected this. I added two supplementary cards in the FORECAST command for my equations. Now, the code runs but it doesn’t produce any results (NAs). I think the problem is at the endogenous as well as at the exogenous variables.

For the endogenous variables, I think that the problem lies with the definitional identities. The FORECAST command treats fdlnprodp and fdlnprod as unrelated variables as it does for the rest of the endogenous variables. More specifically, the code transforms fdlnprodp (and the rest variables that are decomposed in positive and negative values: fdlnprodn, fdlnconsp, fdlnconsn) to dummy variables which take 1 for a positive (negative) value and 0 for a negative (positive) one.

For the exogenous variables (ectp, ectn), I have, also, difficulty in using the suggestions of the manual on how to treat exogenous variables. In Balke and Fomby code, the exogenous variable of “spread” is used as endogenous, if I understand correctly, so the program produces a girf for it in the case of a shock to the Fed Fund rate.

How should I proceed in order to identify correctly the variables (endogenous and exogenous)? Any suggestions would be appreciated. I attach you my code.

Best Regards.

Re: Obtain residuals and IRF

Posted: Wed Dec 04, 2013 5:54 pm
by TomDoan
The model has to include the identities which link the variables. I would recommend using the GROUP instruction (as is done in the Balke-Fomby example from the other thread) rather than listing them out on supplementary cards.