Rank: 37020 based on downloads (last 30 days) and 0 files submitted
photo

MehdiHK Hosseinkouchack

E-mail

Personal Profile:

Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by MehdiHK View all
Updated File Comments Rating
19 Sep 2009 MS_Regress - A Package for Markov Regime Switching Models in Matlab Functions to Estimate, Simulate and Forecast a markov switching model in Matlab Author: Marcelo Perlin

Dear Marcelo,

I would like thank myself from your side for finding a little bug in your code. It is, however, excellent! I appreciate your efforts.

Best of Wishes
MehdiHK

09 Aug 2009 MS_Regress - A Package for Markov Regime Switching Models in Matlab Functions to Estimate, Simulate and Forecast a markov switching model in Matlab Author: Marcelo Perlin

Dear Marcelo,

This still does not solve the problem. I had a check on the probabilities: for k=2 I was checking if sum of the elements of the transition matrix adds up to 2, and it was not! well transposed or not transposed, rows or columns, does not matter now ...

For comment B decreasing search space based on my comment is agreed then.

Best of Wishes
MehdiHK

07 Aug 2009 MS_Regress - A Package for Markov Regime Switching Models in Matlab Functions to Estimate, Simulate and Forecast a markov switching model in Matlab Author: Marcelo Perlin

Dear Marcelo,

A) I am pretty sure that the probabilities do not sum up to the correct value. As a check: for a k=2 case, try to check if sum of all the elements in Coeff.p always is equal to 1 in all the cases!

B) About the search space, for a case of k=2, not that ONE parameters are more than enough, but that TWO are more than enough b/c P=[p11 p12; p21 p22] is identified if from each ROW exactly ONE element is know so 2 element is enough not 3. (you mentioned that 4 can be decreased by 1!!!)

C) ROWS should sum up to ONE not columns.

I closely looked into all of your codes. They are neat, but you have some mistakes that should be fixed.

Thanks a lot
Mehdi

07 Aug 2009 MS_Regress - A Package for Markov Regime Switching Models in Matlab Functions to Estimate, Simulate and Forecast a markov switching model in Matlab Author: Marcelo Perlin

Well, I decided to recode things from the beginning. I think that the p-values are wrong which is because of the problem I mentioned before with the way you enter the probabilities into the search space. This is not just a dimension problem. When you calculate a numerical gradient, for the probability param's for example (for k=2), you change p11 while p12 is constant! In this case even if p11+p12 was 1, it will not be one when feeding it to the likelihood function!!
Another point is that you need to make sure that sum of the probabilities for state j (j=1,2,...,k) is 1. This is not guaranteed in your program.

06 Aug 2009 MS_Regress - A Package for Markov Regime Switching Models in Matlab Functions to Estimate, Simulate and Forecast a markov switching model in Matlab Author: Marcelo Perlin

Nice file, thanks. Although, there are cases for which the algorithm does not work. You need to impose more structure on transition prob matrix Also if there are 2 states then there are only 2 prob's entering the search space not 4. Having more states increases the dimensions very fast.

 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com