Asymmetric ECM IRFs

Discussion of models with structural breaks or endogenous switching.
TVolscho-286
Posts: 25
Joined: Thu May 03, 2012 6:50 pm

Asymmetric ECM IRFs

Unread post by TVolscho-286 »

Hi,
I have tested for and found support for asymmetric cointegration between two variables using the Enders-Siklos procedure. The two variables are 1) a measure of income tax evasion and 2) a measure of IRS audit rates.

One thing that would be helpful is a plot that demonstrates the asymmetry in response to above and below threshold shocks.

I can put together the two regular ECM equations but what most readers like to see are IRFs.

Does anyone have sample code?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Asymmetric ECM IRFs

Unread post by TomDoan »

http://www.estima.com/forum/viewtopic.php?f=8&t=2077 is an example of GIRF's in a similar type of model.
TVolscho-286
Posts: 25
Joined: Thu May 03, 2012 6:50 pm

Re: Asymmetric ECM IRFs

Unread post by TVolscho-286 »

TomDoan wrote:http://www.estima.com/forum/viewtopic.php?f=8&t=2077 is an example of GIRF's in a similar type of model.
Thanks, I do have the handbook from the Switching course. So it looks like this example uses the Sweep command to find the threshold. I used the Enders/Siklos procedure to find the threshold and then I created to variables p1 (above threshold)) and p2 (below threshold).

Where would I start? I am a bit daunted. And would more information help? Like if I gave you the asymmetric ECM equation results? None of the first differences were significant, just the below threshold ECT was highly significant indicating that tax evasion adjusts to negative shocks in the tax return audit rate.

Would I start here (since I already have the threshold for the ECT)?

Code: Select all

dec frml[int] switch
frml switch = 1+fix((spread{1}>=lower)+(spread{1}>upper))
*
* Estimate the model at the best breaks to get the covariance matrix.
*

*
* SMS_5_2.RPF
* Switching Models and Structural Breaks
* Example 5.2
*
* Based upon Balke and Fomby(1997), "Threshold Cointegration,"
* International Economic Review, vol 38, no 3, 627-45.
*
* Data file is a reconstruction.
*
* This estimates the thresholds using the bivariate likelihood, computes
* an eventual forecast function and GIRF.
*
cal(m) 1955:1
open data irates.xls
data(format=xls,org=columns) 1955:01 1990:12 fedfunds mdiscrt
*
set spread = fedfunds-mdiscrt
set thresh = spread{1}
linreg spread
# constant spread{1 2}
@UniqueValues(values=tvalues) thresh %regstart() %regend()
*
compute n=%rows(tvalues)
compute pi=.15
*
compute spacing=fix(pi*n)
*
* These are the bottom and top of the permitted index values for the
* lower index, and the top of the permitted values for the upper index.
*
compute lstart=spacing,lend=n+1-2*spacing
compute uend  =n+1-spacing
*
set dff = fedfunds-fedfunds{1}
set ddr = mdiscrt -mdiscrt{1}
*
sweep
# dff ddr
# constant dff{1} ddr{1} spread{1}
compute loglbest=%logl
*
do lindex=lstart,lend
   do uindex=lindex+spacing,uend
      sweep(group=(thresh>=tvalues(lindex))+(thresh>tvalues(uindex)))
      # dff ddr
      # constant dff{1} ddr{1} spread{1}
     	if %logl>loglbest
        	compute lindexbest=lindex,uindexbest=uindex,loglbest=%logl
  	end do uindex
end do lindex
disp "Best Break Values" tvalues(lindexbest) "and" tvalues(uindexbest)
*
compute lower=tvalues(lindexbest),upper=tvalues(uindexbest)
dec frml[int] switch
frml switch = 1+fix((spread{1}>=lower)+(spread{1}>upper))
*
* Estimate the model at the best breaks to get the covariance matrix.
*
sweep(group=switch(t))
# dff ddr
# constant dff{1} ddr{1} spread{1}
compute tvecmsigma=%sigma
*
set dff = fedfunds-fedfunds{1}
set ddr = mdiscrt -mdiscrt{1}
*
system(model=basevecm)
variables dff ddr
lags 1
det constant spread{1}
end(system)
*
dec rect[frml] tvecfrml(2,3)
do i=1,3
   estimate(smpl=(switch(t)==i))
   frml(equation=%modeleqn(basevecm,1)) tvecfrml(1,i)
   frml(equation=%modeleqn(basevecm,2)) tvecfrml(2,i)
end do i
*
frml(identity) ffid fedfunds = fedfunds{1}+dff
frml(identity) drid mdiscrt  = mdiscrt{1}+ddr
frml(identity) spid spread   = fedfunds-mdiscrt
*
frml dffeq dff = tvecfrml(1,switch(t))
frml ddreq ddr = tvecfrml(2,switch(t))
*
group tvecm dffeq ddreq ffid drid spid
*
* Eventual forecast function, starting with 1981:1 data (largest value
* of spread).
*
forecast(model=tvecm,from=1981:1,steps=40,results=eff)
graph(footer=$
   "Eventual Forecast Function for SPREAD, starting at 1981:1")
# eff(5)
graph(footer=$
   "Eventual Forecast Function for Change in DR, starting at 1981:1")
# eff(2)
*
* GIRF starting in 1969:3 for a one s.d. shock to DR correlated with FF
* using the estimated covariance matrix. (1969:3 has values for both
* rates which are close to the average for the full period).
*
compute ndraws=5000
compute baseentry=1969:3
compute nsteps   =40
*
dec vect[series] fshocks(2) girf(5)
dec series[vect] bishocks
dec vect ishocks
*
smpl baseentry baseentry+(nsteps-1)
do i=1,5
   set girf(i) = 0.0
end do i
*
compute fsigma=%psdfactor(tvecmsigma,||2,1||)
*
do draw=1,ndraws
   gset bishocks = %ranmvnormal(fsigma)
   set fshocks(1) = bishocks(t)(1)
   set fshocks(2) = bishocks(t)(2)
   forecast(paths,model=tvecm,results=basesims)
   # fshocks
   compute ishock=fsigma(2,2)
   compute ishocks=inv(fsigma)*bishocks(baseentry)
   compute ishocks(2)=ishock/fsigma(2,2)
   compute bishocks(baseentry)=fsigma*ishocks
   compute fshocks(1)(baseentry)=bishocks(baseentry)(1)
   compute fshocks(2)(baseentry)=bishocks(baseentry)(2)
   forecast(paths,model=tvecm,results=sims)
   # fshocks
   do i=1,5
      set girf(i) = girf(i)+(sims(i)-basesims(i))
   end do i
end do draw
*
do i=1,5
   set girf(i) = girf(i)/ndraws
end do i
*
graph(footer=$
  "GIRF for Discount Rate to One S.D. Shock in Discount Rate")
# girf(4)
graph(footer=$
  "GIRF for FedFunds Rate to One S.D. Shock in Discount Rate")
# girf(3)
graph(footer=$
  "GIRF for Spread to One S.D. Shock in Discount Rate")
# girf(5)
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Asymmetric ECM IRFs

Unread post by TomDoan »

TVolscho-286 wrote:
TomDoan wrote:http://www.estima.com/forum/viewtopic.php?f=8&t=2077 is an example of GIRF's in a similar type of model.
Thanks, I do have the handbook from the Switching course. So it looks like this example uses the Sweep command to find the threshold. I used the Enders/Siklos procedure to find the threshold and then I created to variables p1 (above threshold)) and p2 (below threshold).

Where would I start? I am a bit daunted. And would more information help? Like if I gave you the asymmetric ECM equation results? None of the first differences were significant, just the below threshold ECT was highly significant indicating that tax evasion adjusts to negative shocks in the tax return audit rate.

Would I start here (since I already have the threshold for the ECT)?
How does your model differ from this? Our example has
  1. known cointegrating vector (the spread)
  2. three-regime threshold model with arbitrary (and still to be estimated) upper and lower breakpoints
TVolscho-286
Posts: 25
Joined: Thu May 03, 2012 6:50 pm

Re: Asymmetric ECM IRFs

Unread post by TVolscho-286 »

Hi Tom,
I have:

a) the residuals
b) the threshold value

Is this all I need?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Asymmetric ECM IRFs

Unread post by TomDoan »

TVolscho-286 wrote:Hi Tom,
I have:

a) the residuals
b) the threshold value

Is this all I need?
Not if you want IRF's. You need to be able to generate simulations of the data, since it's the levels of the data that determine the deviation from the threshold.
TVolscho-286
Posts: 25
Joined: Thu May 03, 2012 6:50 pm

Re: Asymmetric ECM IRFs

Unread post by TVolscho-286 »

Hi Tom,

So I have:

a) the two original series
b) the residuals from cointegrating regression
c) the threshold value from Enders/Siklos
d) two variables I created p1 (above threshold residuals, 0) and p2 (below threshold residuals, 0)

I want to plot the IRF due to a one-unit shock that disturbs the long-run equilibrium.
TVolscho-286
Posts: 25
Joined: Thu May 03, 2012 6:50 pm

Re: Asymmetric ECM IRFs

Unread post by TVolscho-286 »

Here are the asymmetric ECMs

P1 = residuals if above or equal to threshold chosen by TAR, else = 0
P2 = residuals if below threshold chosen by TAR, else = 0


DTax Evasion = -.108 -.067*P1(T=.84) -.580*P2(t=3.77) + .310*D_Tax Evasion(t-1)(T=2.23) - .110*DAudit((t-1)T=0.63)

DCorpAudit = -.271 -.087*P1(t=1.12) -.090*P2(t=0.70) + .160*DTax Evasion(t=1.38) + .196*DAudit(t=1.35)

Thus, I want to model the response to P2 in the first equation. Assuming a steady-state equilibrium and applying standard deviation shock.

That being said, where would I need to start modifying the above code?

Thanks again for your help!
Coribe
Posts: 4
Joined: Mon Jun 27, 2011 3:40 pm

Re: Asymmetric ECM IRFs

Unread post by Coribe »

Would it be possible to modify the above code (or the Balke-Fomby code more generally) so as to estimate separate GIRFs for each regime?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Asymmetric ECM IRFs

Unread post by TomDoan »

Coribe wrote:Would it be possible to modify the above code (or the Balke-Fomby code more generally) so as to estimate separate GIRFs for each regime?
That depends upon what you mean. It doesn't make sense to look at the response confined to just one regime as that's not how the model works. However, a GIRF depends upon initial conditions and there is no "generic" condition for being in one regime. In one of his other papers, Balke averaged the GIRF's across all the observations which fell into one regime. That's one way to define that, but far from the only one.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Asymmetric ECM IRFs

Unread post by TomDoan »

TVolscho-286 wrote:Here are the asymmetric ECMs

P1 = residuals if above or equal to threshold chosen by TAR, else = 0
P2 = residuals if below threshold chosen by TAR, else = 0


DTax Evasion = -.108 -.067*P1(T=.84) -.580*P2(t=3.77) + .310*D_Tax Evasion(t-1)(T=2.23) - .110*DAudit((t-1)T=0.63)

DCorpAudit = -.271 -.087*P1(t=1.12) -.090*P2(t=0.70) + .160*DTax Evasion(t=1.38) + .196*DAudit(t=1.35)

Thus, I want to model the response to P2 in the first equation. Assuming a steady-state equilibrium and applying standard deviation shock.

That being said, where would I need to start modifying the above code?

Thanks again for your help!
How is the threshold defined in terms of Tax Evasion and Audit? You need a model written entirely in terms of the two dependent variables.
Post Reply