how to calculate transition probability matrix in rats

Questions and discussions on Time Series Analysis
fan
Posts: 215
Joined: Wed Jun 19, 2013 5:14 pm

Re: how to calculate transition probability matrix in rats

Unread post 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.
Attachments
matrix.pdf
(86.96 KiB) Downloaded 741 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: how to calculate transition probability matrix in rats

Unread post by TomDoan »

Wouldn't that be a (very) simple case of a time-varying transition probability?
fan
Posts: 215
Joined: Wed Jun 19, 2013 5:14 pm

Re: how to calculate transition probability matrix in rats

Unread post 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.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: how to calculate transition probability matrix in rats

Unread post 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.
fan
Posts: 215
Joined: Wed Jun 19, 2013 5:14 pm

Re: how to calculate transition probability matrix in rats

Unread post 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
*
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: how to calculate transition probability matrix in rats

Unread post 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.
fan
Posts: 215
Joined: Wed Jun 19, 2013 5:14 pm

Re: how to calculate transition probability matrix in rats

Unread post 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
fan
Posts: 215
Joined: Wed Jun 19, 2013 5:14 pm

Re: how to calculate transition probability matrix in rats

Unread post 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
Post Reply