Page 3 of 4

Re: MS-ARIMA

Posted: Sun Dec 13, 2015 9:49 pm
by fan
Hi Tom,
Is there any code available for calculating t-ratios by using delta method is using MLE?

Re: MS-ARIMA

Posted: Sun Dec 13, 2015 10:07 pm
by TomDoan
SUMMARIZE (second form) does that. (BTW, delta method is in the manual index).

Re: MS-ARIMA

Posted: Thu Dec 17, 2015 1:39 pm
by fan
TomDoan wrote:SUMMARIZE (second form) does that. (BTW, delta method is in the manual index).
Hi tom, Thank you for your quick reply. I tried summarize instruction to calculate the t-test for P11 and P22 which are the functions of theta1 and theta2 from my estimation. However, I got error message like this all the time.

Code: Select all

## OP3 This Instruction Does Not Have An Option PAR 
>>>>summarize(parmset=<<<<. 
Could you please kindly take a look at my code and let me know where my mistake is? Many Thanks

Re: MS-ARIMA

Posted: Thu Dec 17, 2015 2:08 pm
by TomDoan
PARMSET is a relatively new option (added with 8.2).

Re: MS-ARIMA

Posted: Thu Dec 17, 2015 2:11 pm
by fan
TomDoan wrote:PARMSET is a relatively new option.
Thanks for the quick reply. I am using rats8.0. Does it mean I can not use the summarize instruction here? Is there another instruction I can use to calculate the t-ratio for P11 and P22?

Re: MS-ARIMA

Posted: Thu Dec 17, 2015 2:44 pm
by TomDoan
You should ask your department to get the software updated. However, with 8.0 you can do the same thing, but you have to use expressions with the clumsier %beta(position) to reference parameters.

Re: MS-ARIMA

Posted: Thu Dec 17, 2015 3:04 pm
by fan
TomDoan wrote:You should ask your department to get the software updated. However, with 8.0 you can do the same thing, but you have to use expressions with the clumsier %beta(position) to reference parameters.
Thank you for the quick reply

Re: MS-ARIMA

Posted: Mon Dec 21, 2015 2:05 am
by fan
TomDoan wrote:SUMMARIZE (second form) does that. (BTW, delta method is in the manual index).
Hi Tom. I would like to get the statistical inference on Pii, exp(theta), by using simulation method. What instruction should I use? Is there any example I can take a look at? Many Thanks

Re: MS-ARIMA

Posted: Mon Dec 21, 2015 7:49 am
by TomDoan
"Instruction"? Gibbs sampling for a model like that is probably 100 lines of code. You would have to adapt the Kim-Nelson example to the ARMA model (which would require some form of Metropolis sampling) and time-varying transition probabilities (which would require sampling a logit model). Given that you're doing just two regimes, it would be simpler to switch to a probit-style function for the transition probabilities rather than a logit. The two should give very similar results, but Gibbs sampling is much simpler for a probit than a logit. (The logit is simpler to handle for the TVTP if you have three or more regimes).

Re: MS-ARIMA

Posted: Thu Feb 18, 2016 2:51 am
by fan
TomDoan wrote:"Instruction"? Gibbs sampling for a model like that is probably 100 lines of code. You would have to adapt the Kim-Nelson example to the ARMA model (which would require some form of Metropolis sampling) and time-varying transition probabilities (which would require sampling a logit model). Given that you're doing just two regimes, it would be simpler to switch to a probit-style function for the transition probabilities rather than a logit. The two should give very similar results, but Gibbs sampling is much simpler for a probit than a logit. (The logit is simpler to handle for the TVTP if you have three or more regimes).
Hi Tom. Thank you for your detailed explanation. In addition to the Gibbs sampling and delta method, is there any other method I could use to generate the statistical inference on p=exp(theta)/(1+exp(theta)) given theta is the estimate from the model?

Re: MS-ARIMA

Posted: Thu Feb 18, 2016 7:49 am
by TomDoan
Not really. I don't see bootstrapping as an option with a model like this.

Re: MS-ARIMA

Posted: Thu Mar 03, 2016 1:13 am
by fan
TomDoan wrote:Not really. I don't see bootstrapping as an option with a model like this.
Dear Tom, thank you for the reply. The examples in the Kim and Nelson's book (state-space model with regime switching) report the estimated probabilities (p and q), instead of the thetas. Your codes for the examples give us the estimated thetas only. Therefore, I am wondering how I can get the estimated probabilities and their statistical inferences as ones reported in the book. One way I know is to apply the delta method, is there any other method for obtaining the estimated probabilities and their statistical inferences. Thank you in advance

Re: MS-ARIMA

Posted: Thu Mar 03, 2016 7:17 am
by TomDoan
Didn't I just answer that? What's wrong with the delta method?

Re: MS-ARIMA

Posted: Mon Mar 21, 2016 11:42 pm
by fan
TomDoan wrote:Didn't I just answer that? What's wrong with the delta method?
Thank you for the answer. There is nothing wrong with the delta method. I just would like to know why the results calculated from the delta method are so different from the ones reported in the text book.

Re: MS-ARIMA

Posted: Tue Mar 22, 2016 7:40 am
by TomDoan
Could you cite a specific example?