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.src
Detailed description
PANELTHRESH—Testing for threshold in FE estimates
-
Poppelwops
- Posts: 8
- Joined: Thu Jan 22, 2009 11:39 am
Re: PANELTHRESH - Testing for threshold in FE estimates
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
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).
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).
Last bumped by TomDoan on Fri Dec 05, 2014 11:41 am.