I am working on a project that basically involves running the same regression on a large number of data sets, where each set is really the same data set taken at a different date. (So it's just a matrix of real-time data for the same set). The real-time data set I'm using in for the Leading Economic Index, and I'm trying to use it to predict the probability of recession. The data is ordered from LEI1 to LEI575 where LEI1 is the first version of the series available to me and LEI575 is the most recent version available.
One of the regression models I am attempting to make work is a very simple Markov-Chain switching regression, where I am trying to endogenously estimate the probability of the series being in state 1 or state 2, using the probability of state 2 as a stand-in for the probability of recession.
Code: Select all
group RTD LEI*
for !i=1 to RTD.count
equation eq{!i}.switchreg(type="markov", heterr) LEI{!i} c @prv c
eq{!i}.makergmprobs(type="filt", view="sheet") fin{!i}a fin{!i}b
next
group prob1 fin*a
group prob2 fin*b
When I generate one or two series from the data the results are very reasonable and seem to match up well with the actual historic occurrence of recession. However when I use this code to generate regression data for all series at once the results vary wildly. For any given date the probability of there being a recession swings wildly from unlikely to highly likely between series, even for two dates next to each other, where you wouldn't expect substantial changes in the series.
This is very disconcerting. Am I doing something wrong with my code? This should be very doable but I can't figure it out.