Page 2 of 2

Re: how to calculate transition probability matrix in rats

Posted: Thu Sep 17, 2015 8:54 pm
by fan
TomDoan wrote:Using what information? In the post-war period, you only have Truman, Johnson(?), Carter, Clinton, Obama. Depending upon whether you count Johnson, it's either 3/4 or 4/5. There is a literature that predicts results based upon economic trends, and it probably gets it right about as often as a coin flip.
Hi Tom, thank you for your reply. Please, allow me to rephrase my question. I am trying to estimate the transition probability between economic expansions (E) and economic Recessions (R) conditioning on presidential partisanship and lagged economic status. I have monthly data from 1945:10 to 2015:07. Particularly, I am interested in estimating the parameters "p", "q","a", and "b" in the attached the matrices. I am not sure how I can estimate those parameters in Rats and what instructions I should use. Is there any similar examples I can take a look? Thank you in advance.

Re: how to calculate transition probability matrix in rats

Posted: Thu Sep 17, 2015 10:12 pm
by TomDoan
Wouldn't that be a (very) simple case of a time-varying transition probability?

Re: how to calculate transition probability matrix in rats

Posted: Thu Sep 17, 2015 11:30 pm
by fan
TomDoan wrote:Wouldn't that be a (very) simple case of a time-varying transition probability?
Thanks for the quick reply. It is a simple case of a time-varying transition probability to many people. This is my first time to do such estimation so it is not simple to me. My rough idea is that the parameters could be estimated using maximizing likelihood instruction plus markov switching setup. Please, kindly let me know whether I am heading to the right direction.

Re: how to calculate transition probability matrix in rats

Posted: Fri Sep 18, 2015 7:19 am
by TomDoan
Are Recession and Expansion observable (i.e. using NBER or something else) or hidden (as in Hamilton)? The former is just a counting exercise as described above. If you want a hidden state model, you need to figure out what change the hidden state makes to the observable.

Re: how to calculate transition probability matrix in rats

Posted: Thu Oct 08, 2015 12:43 am
by fan
TomDoan wrote:Are Recession and Expansion observable (i.e. using NBER or something else) or hidden (as in Hamilton)? The former is just a counting exercise as described above. If you want a hidden state model, you need to figure out what change the hidden state makes to the observable.
Hi Tom, Thanks for the reply. Actually, I would like to modify Filardo(1994) to examine the role of presidential partisanship and presidential election effect in the transition probabilities. My understanding is that I can keep most the example codes with only changes to the logistic index for the transitions.Could you please kindly check the attached codes?

Code: Select all

*
* Define the logistic index for the transitions
*
equation p1eq *
# demo rep nonelection election
equation p2eq *
# demo rep nonelection election
*

Re: how to calculate transition probability matrix in rats

Posted: Thu Oct 08, 2015 9:57 am
by TomDoan
Doesn't that have a dummy variable trap? You have two full sets of dummies so you have collinearity. Probably the best thing to do is to use CONSTANT, and one of each of the other two pairs.

Re: how to calculate transition probability matrix in rats

Posted: Thu Oct 08, 2015 10:12 am
by fan
TomDoan wrote:Doesn't that have a dummy variable trap? You have two full sets of dummies so you have collinearity. Probably the best thing to do is to use CONSTANT, and one of each of the other two pairs.
Thank you for the quick reply and for pointing out the mistake

Re: how to calculate transition probability matrix in rats

Posted: Fri Oct 09, 2015 4:31 am
by fan
TomDoan wrote:Doesn't that have a dummy variable trap? You have two full sets of dummies so you have collinearity. Probably the best thing to do is to use CONSTANT, and one of each of the other two pairs.
Hi Tom. What is the instruction for obtaining the estimated transition probability after applying EM algorithm? In addition, can you please let me know how I can replicate the weighted transition probability series in the Filardo(1994). Thank you in advance