Escolar Documentos
Profissional Documentos
Cultura Documentos
Coefficientsmaychangeovertime
Evolutionoftheeconomy
Policychanges
TimeVaryingParameters
yt = t + xt t + et
Coefficientsdependonthetimeperiod
Ifthecoefficientsvaryrandomlyandare
unpredictable,thentheycannotbeestimated
Astherewouldbeonlyoneobservationforeach
setofcoefficients
Wecannotestimatecoefficientsfromjustone
observation!
SmoothlyTimeVaryingParameters
yt = t + xt t + et
Ifthecoefficientschangegraduallyovertime,
thenthecoefficientsaresimilarinadjacenttime
periods.
Wecouldtrytoestimatethecoefficientsfortime
periodt byestimatingtheregressionusing
observations[t w/2,, t+ w/2]wherew is
calledthewindowwidth.
w isthenumberofobservationsusedforlocal
estimation
RollingEstimation
Thisiscalledrolling estimation
Foragivenwindowwidthw,yourollthrough
thesample,usingw observationsfor
estimation.
Youadvanceoneobservationatatimeand
repeat
Thenyoucanplottheestimatedcoefficients
againsttime
Whattoexpect
Rollingestimateswillbeacombinationoftrue
coefficientsandsamplingerror
Thesamplingerrorcanbelarge
Fluctuationsintheestimatescanbejusterror
Ifthetruecoefficientsaretrending
Expecttheestimatedcoefficientstodisplaytrendplus
noise
Ifthetruecoefficientsareconstant
Expecttheestimatedcoefficientstodisplayrandom
fluctuationandnoise
Example:GDPGrowth
STATArolling command
STATAhasacommandforrollingestimation:
.rolling,window(100)clear:regressgdp L(1/3).gdp
Inthiscommand:
window(100) setsthewindowwidth
w=100
Thenumberofobservationsforestimationwillbe100
clear
Clearsoutthedatainmemory
Thedatawillbereplacedbytherollingestimates
Itisnecessary
rolling command
.rolling,window(100)clear:regressgdp L(1/3).gdp
Thepartafterthe:
regressgdp L(1/3).gdp
ThisisthecommandthatSTATAwillimplementusing
therollingmethod
AnAR(3)willbefitusing100observations,rolling
throughthesample
Example
GDP,quarterly,1947Q1through2009Q4
251observations
Usingw=100
Thefirstestimationwindowis1947Q21972Q1
Thesecondis1947Q31972Q2
Thereare152estimationwindows
Thefinalis1985Q12009Q4
STATAExecution:
AfterRollingExecution
Theoriginaldatahavebeenclearedfrommemory
STATAshowsnewvariables
start
end
_stat_1
_stat_2
_stat_3
_b_cons
Theothersaretherollingestimates,ARandintercept
Timereset
Astheoriginaldatahavebeencleared,sohasyourtime
index.
Sothetsline commanddoesnotworkuntilyouresetthe
time
Youcansetthetimetobestartorend
.tsset start
.tsset end
Or,moreelegantly,youcansetthetimetobethemid
pointofthewindow
.gent=round((start+end)/2)
.formatt%tq
.tsset t
Thistimeindexrunsfrom1959Q4through1997Q3
Timeresetexample
Example
PlotRollingCoefficients
Nowyoucanplottheestimatedcoefficients
againsttime
Youcanuseseparateorjointplots
.tsline _b_cons
.tsline _stat_1_stat_2_stat_3
RollingIntercept
RollingARcoefficients
Analysis
Theestimatedinterceptis
decreasinggradually
TheAR(1)coef isquitestable
TheAR(2)coef startsincreasing
around1990
TheAR(3)coef is0mostofthe
period,butisnegativefrom
19601973andafter1995
Allofthegraphsgoabitcrazy
over19901997
Sequential(Recursive)Estimation
Asanalternativetorollingestimation,
sequential orrecursive estimationusesallthe
datauptothewindowwidth
Firstwindow:[1,w]
Secondwindow:[1,w+1]
Finalwindow:[1,T]
Withsequentialestimation,window isthe
lengthofthefirstestimationwindow
RecursiveEstimation
STATAcommandissimilar,butaddsrecursive aftercomma
.rolling,recursivewindow(100)clear:regressgdp
L(1/3).gdp
STATAclearsdataset,replaceswithstart,end,and
recursivecoefficientestimates_b_cons,_stat_1,etc.
Useend fortimevariable
.tsset end
Thissetsthetimeindextotheendperiodusedforestimation
RecursiveIntercept
RecursiveARcoefficients
Analysis
Therecursiveintercept
fluctuates,butdecreases
Dropsaround1984,and1990
TherecursiveAR(1)and
AR(2)coefs areverystable
TherecursiveAR(3)coef
increases,andthenbecomes
stableafter1984.
Summary
Userollingandrecursiveestimationto
investigatestabilityofestimatedcoefficients
Lookforpatternsandevidenceofchange
Trytoidentifypotentialbreakdates
InGDPexample,possibledates:
1970,1984,1990
TestingforBreaks
Didthecoefficientschangeatsomebreakdate
t*?
Wecantestifthecoefficientsbeforeandafter
t* arethesame,oriftheychanged
SimpletoimplementasanF testusing
dummyvariables
KnownasaChowtest
GregoryChow
ProfessorGregoryChowof
PrincetonUniversity
(emeritus)
ProposedtheChowTest
forstructuralchangeina
famouspaperin1960
DummyVariable
Foragivenbreakdate t*
Defineadummyvariabled
d=1ift>t*
ModelwithBreaks
OriginalModel
yt = + xt + et
Modelwithbreak
yt = + xt + d t + d t xt + et
Interpretingthecoefficients
=changeinintercept
=changeinslope
ChowTest
yt = + xt + d t + d t xt + et
Themodelhasconstantparametersif==0
Hypothesistest:
H0:=0and=0
ImplementasanF testafterestimation
Ifprob>.05,youdonotrejectthehypothesisof
stablecoefficients
Example:GDP
Chowtest
Thepvalueislargerthan0.05
Itisnotsignificant
Wedonotrejecthypothesisofconstantcoefficients
FishingforaBreakdate
AnimportanttroublewiththeChowtestis
thatitassumesthatthebreakdate isknown
beforelookingatthedata
Butweselectedthebreakdate byexamining
rollingandrecursiveestimates
Thismeansthataretoolikely tofind
misleadingevidenceofnonconstant
coefficients
Fishing
Wecouldconsiderpickingmultiplepossible
breakdates t*=[t1,t2,,tM]
Foreachbreakdate t*,wecouldestimatethe
regressionandcomputetheChowstatistic
F(t*)
Fishingforabreakdate issimilartosearching
forabig(significant)Chowstatistic.
TheQuandtLikelihodRatio(QLR)Statistic
(alsocalledthesupWaldstatistic)
RichardQuandt
ProfessorRichardQuandt (1930)
PrincetonUniversity
Estimationofbreakdate (Quandt,1958)
QLRtest(Quandt,1960)
QLRCriticalValues
QLR = max[F(0), F(0+1) ,, F(11), F(1)]
q i =1 s(1 s )
Note that these critical values are larger than the Fq, critical
values for example, F1, 5% critical value is 3.84.
38
QLRTheory
DistributiontheoryfortheQLRstatistic
Developedby
ProfessorDonaldAndrews(Yale)
HasthepostwarU.S.PhillipsCurvebeen
stable?
Consider a model of Inft given Unempt the empirical
backwards-looking Phillips curve, estimated over (1962 2004):