Page 1 of 1

PANELTHRESH - Testing for threshold in FE estimates

PostPosted: Mon Sep 12, 2011 3:47 pm
by TomDoan
This tests a fixed effects regression for one or two breaks in a single regressor, with breaks determined by the values of another variable. This is from Bruce Hansen(1999), "Threshold effects in non dynamic panels: estimation, testing and inference" Journal of Econometrics, vol 93, pp 345-368.

The regression (with two breaks) takes the form:

y(i,t)=a(i)+x(t,i)b+z(t,i)*(q(t,i)<=gamma1)+z(t,i)*(q(t,i)<=gamma2)

This requires a separate fixed effects regression for each test setting for the break values. If q is a continuous variable, a complete search over all possible values in a panel data set could be very time consuming. As a result, you can examine a reduced number of quantiles of the values of q. It also only does an exhaustive search for the first break, then examines the second break given the first.

An example (from the original paper) is provided at http://www.estima.com/forum/viewtopic.php?f=8&t=1195.



@PanelThresh( options ) depvar start end
# list of regressors (omit CONSTANT)


Options

THRESHVAR=series that determines the breaks [required]
BREAKVAR =series that is dummied out at the break
QN=number of quantiles of the threshold variable to examine. The default is [max(400,actual values)]
T1=trimming fraction on ends for first threshold [.01]
[PRINT]/NOPRINT
TITLE=title for report ["Panel Threshold Analysis, Threshold Variable xxx"]

Re: PANELTHRESH - Testing for threshold in FE estimates

PostPosted: Wed Feb 20, 2013 8:41 am
by Poppelwops
If I understand correctly, the code only allows for a break in the coefficient of one single regressor. The coefficients of the other regressors are assumed to be equal across regimes. Is there a (preferably) easy way to modify the code in order to allow for more than 1 of the coefficients to switch across regimes? Many thanks in advance!

Re: PANELTHRESH - Testing for threshold in FE estimates

PostPosted: Wed Feb 20, 2013 11:08 am
by TomDoan
This would have to allow for two breakvar/cf0 combinations:

set cf0 = breakvar*(threshvar<=gammas(i))
preg(method=fixed,smpl=smpl,noprint) depvar startl endl
# baselist cf0
compute rssthr1(i)=%rss


compute %%ftest1_0=(rss0-%%rss1)/(%%rss1/%nobs)

and

set ftestser 1 qn = (rss0-rssthr1(t))/(rssthr1(t)/%nobs)

would need to /2 because of the 2 restrictions rather than 1


set cf0 = breakvar*(threshvar<=test1)
set cf2 = breakvar*(threshvar>test2)
preg(method=fixed,smpl=smpl,noprint) depvar startl endl
# baselist cf0 cf2

would have now four combinations of break variance and threshold

and

compute %%ftest2_1=(%%rss1-%%rss2)/(%%rss2/%nobs)

would again need to have a /2 (this is for the nested test so it's 4 restrictions vs 2).