Question about replication of Filardo(1994)

Discussion of models with structural breaks or endogenous switching.
fan
Posts: 215
Joined: Wed Jun 19, 2013 5:14 pm

Re: Question about replication of Filardo(1994)

Unread post by fan »

hi Tom,

I am trying to us EM method to estimate follow codes. The error message says "## OP4. The Option DOM Is Already Set By This Instruction
>>>>omu,dovar,domustar)<<<<" I am not sure where the mistake is. Could you please kindly take a look at my codes? Thank you

Code: Select all

set dummy = t>=1983:01
dec vect mustar(2)
*******************************************************
*
* Common setup
*
compute nlags=4
*
source msvarsetup.src
compute gstart=1948:6,gend=1992:8
@MSVARSetup(lags=nlags)
# g
*********************************************************************
function %MSVARFVec time
type vect %MSVARFVec
type integer time
local integer i j state
local vect u
dim %MSVARFVec(nexpand)
do i=1, nexpand
com state=MSVARLagState(i,1)
com u=%xt(y,time)-mu(state)(1)-mustar(state)*dummy(time)
do j=1,nlags
com statej=MSVARLagState(i,j+1),$
u=u-phi(j)*(%xt(y,time-j)-mu(statej)(1)-mustar(statej)*dummy(time-j))
end do j
com state=MSVARLagState(i,1)
com %MSVARFVec(i)=exp(-.5*MSVARLogDetV(state)-.5*%qform(MSVARSigmaInv(state),u))
end do i
end
* Fixed probabilities
*
nonlin(parmset=common) mu phi sigma  mustar
nonlin(parmset=fixed)  p
*
frml msvarf = log(%MSVarProb(t))
*********************************************************************
@MSVARInitial gstart gend
@msvarEMgeneralsetup
*
* Guess values which make 1 the low growth state as in the paper.
*
compute mu(1)=-1.7,mu(2)=.3, mustar(1)=0.0, mustar(2)=0.0
compute p(1,1)=.3,p(1,2)=.1
*
* Estimate by the quicker EM algorithm
*
@msvartestvector(dop,domu,dovar,domustar) baseparms
do emits=1,50
   @msvaremstep gstart gend
   @msvartestvector(dop,domu,dovar,domustar) testparms
   compute %cvcrit=%testdiff(baseparms,testparms)
   if %cvcrit<.0001
      break
   compute baseparms=testparms
   disp "Iteration" emits "Log Likelihood" %logl %cvcrit
end do emits
*
* Do five iterations with BHHH to get standard errors.
*
maximize(start=(pstar=%MSVARInit()),parmset=fixed+common,$
  method=bhhh,iters=20) msvarf gstart gend
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Question about replication of Filardo(1994)

Unread post by TomDoan »

The @MSVAR... procedures have no idea what your MUSTAR parameters are. If you want to apply EM to your altered model, you'll have to figure out how to adapt it. Since your model is so small, it's not clear that it's worth the effort.
fan
Posts: 215
Joined: Wed Jun 19, 2013 5:14 pm

Re: Question about replication of Filardo(1994)

Unread post by fan »

TomDoan wrote:The @MSVAR... procedures have no idea what your MUSTAR parameters are. If you want to apply EM to your altered model, you'll have to figure out how to adapt it. Since your model is so small, it's not clear that it's worth the effort.
Thank you for the quick reply
fan
Posts: 215
Joined: Wed Jun 19, 2013 5:14 pm

Re: Question about replication of Filardo(1994)

Unread post by fan »

TomDoan wrote:I don't think there's an issue with "endogeneity" of the transition variables as long as they're predetermined (i.e. lagged). In the Filardo article, for instance, it's probably safe to say that none of the variables used for the indicators are strictly exogenous in a statistical sense. Where you might run into a problem is where the indicator variable is also in the model or a close relative of it is in the model. The "switch" could then possibly end up simply proxying for some other form of non-linearity in the model.
Dear Tom, sorry to bother you again. What I really mean in the last question is that how I can capture the causality, not "endoengeneity", between economic condition and the occurrence and outcome of elections. For example, the recent past economic condition before the election could have impact on which party will win the presidential election and the party won the election could impact economic condition after the election in the U.S.. In my simple case, election outcomes affect economy through the transition prob. function P[St | St-1, Zt] and the outcomes are taken as exogenous. Now, to make a more realistic model, I would like to capture the causality between the election outcome and recent past past economic condition measured in the probability in low growth state, for instance P[St, Zt | St-1] = P[St | St-1, Zt] *P[Zt |St-1]. I understand that restriction is needed for that election only occur every 4 years in the U.S. However, I am not sure how to impose such restriction. Could you please kindly share your advice on how to capture the causality in my more realistic model? Is there any similar model used by others I can study? Many Thanks
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Question about replication of Filardo(1994)

Unread post by TomDoan »

What is Zt? And if it has something to do with elections, isn't your timing all wrong? The election at t would depend upon St, not t-1.

There is nothing wrong with having multiple observables in an MS model. And as in the case with state-space models, you can have partial observables---just figure out what the likelihood is at t when you don't have an election and what it is when you do.
Post Reply