by TL » Thu Jul 23, 2009 11:12 am
Dear Tom,
I am not sure whether my previous post was clear enough. Nevertheless, please let me know if I could help clarify this. I would appreciate it if you could give me suggestions how to implement the procedure in RATS (or what I should start with).
To acquire parameter estimates and estimated standard errors from the time-varying transition probability Markov-switching model, I have used the attached code you and Mr Maycock have kindly helped me.
Currently, I would like to construct residual-based diagnostic tests such as the Ljung-Box portmanteau test which
(1) applied to the residuals for j autocorrelations, to test for residual autocorrelation up to jth order [Q(j)]
(2) applied to the squared residuals for j autocorrelations, to test for autoregressive heteroscedasticity of up to jth order [Q^2(j)]
Nevertheless, since the state variable St is unobservable, the residuals from the fitted model are also unobservable.
Following Maheu and McCurdy (2000), I understand that I should construct the standardized expected residuals as a weighted average of the residuals obtaining under each regime, with the weights equal to the smoothed probabilities of being in each regime.
Could you please give me suggestions how to implement the procedure in RATS?
Thank you very much for your help and kindness.
Tim
Last edited by
TL on Sat Jan 30, 2010 3:32 pm, edited 1 time in total.