﻿
Chapter27. CointegrationandVectorErrorCorrectionModels
250
Identiﬁcationandtestability
One pointregarding g VECMrestrictions that canbeconfusingatﬁrstis that identiﬁcation (does
therestrictionidentifythesystem?) andtestability(istherestrictiontestable?)arequiteseparate
matters. Restrictions s canbeidentifyingbutnottestable;lessobviously,theycanbetestablebut
notidentifying.
Thiscanbeseenquiteeasilyinrelationto arank-1system. . Therestriction
1
1isidentifying
(itpins downthescaleof)but,beingapurescaling,itisnottestable. . Ontheotherhand, , the
restriction
1
2
0istestable—thesystemwiththisrequirementimposedwillalmostcertainly
havealowermaximizedlikelihood—butitisnotidentifying;itstillleavesopenthescaleof.
Wesaidabovethatthenumberofrestrictionsmustequalatleastr
2
,whereisthecointegrating
rank,foridentiﬁcation.Thisisanecessaryandnotasuﬃcientcondition.Infact,whenr >1itcan
bequitetrickytoassesswhetheragivensetofrestrictionsisidentifying. Gretlusesthemethod
suggestedbyDoornik(1995),whereidentiﬁcationisassessedviatherankoftheinformationma-
trix.
Itcanbeshownthatforrestrictionsofthesort(27.7)and(27.8)theinformationmatrixhas the
samerankastheJacobianmatrix
J
h
I
p
G: I
p
1
H
i
AsuﬃcientconditionforidentiﬁcationisthattherankofJequalsthenumberoffreeparam-
eters. Therank k of this matrix x isevaluated byexaminationofits singular r values atarandomly
selectedpointintheparameterspace. Forpracticalpurposeswetreatthisconditionasifitwere
bothnecessaryandsuﬃcient;thatis,wedisregardthespecialcaseswhereidentiﬁcationcouldbe
achievedwithoutthisconditionbeingmet.7
27.7 Numericalsolutionmethods
Ingeneral,theMLestimatorfortherestrictedVECMproblemhasnoclosed-formsolution,hence
themaximummustbefoundvianumericalmethods.
8
Insomecasesconvergencemaybediﬃcult,
andgretlprovidesseveralchoicestosolvetheproblem.
SwitchingandLBFGS
Twomaximizationmethodsareavailableingretl. Thedefaultistheswitchingalgorithmsetout
inBoswijkandDoornik(2004). Thealternativeisalimited-memoryvariantoftheBFGSalgorithm
(LBFGS), using analyticalderivatives. . Thisis s invokedusing the--lbfgs ﬂag with therestrict
command.
Theswitchingalgorithmworksbyexplicitlymaximizingthelikelihoodateachiteration,withre-
spectto
ˆ
,
ˆ
and
ˆ
Ú(thecovariancematrixoftheresiduals)inturn. Thismethodsharesafeature
withthebasicJohanseneigenvaluesprocedure,namely,itcanhandleasetofrestrictionsthatdoes
notfullyidentifytheparameters.
LBFGS,ontheotherhand,requiresthatthemodelbefullyidentiﬁed.WhenusingLBFGS,therefore,
youmayhavetosupplementtherestrictionsofinterestwithnormalizationsthatservetoidentify
theparameters. Forexample,onemightuseallorpartofthePhillipsnormalization(seesection
27.5).
Neither theswitching g algorithm nor LBFGS is guaranteed to ﬁnd theglobalML solution.The
7
SeeBoswijkandDoornik(2004),pp.447–8fordiscussionofthispoint.
8
Theexceptionisrestrictionsthatarehomogeneous,commontoallorall(incase r >1),and involveeither
onlyoronly.SuchrestrictionsarehandledviathemodiﬁedeigenvaluesmethodsetoutbyJohansen(1995).Wesolve
directlyfortheMLestimator,withoutanyneedforiterativemethods.
9
Indevelopinggretl’sVECM-testingfacilitieswehaveconsideredafairnumberof“trickycases”fromvarioussources.
We’d liketothankLucaFanellioftheUniversityofBolognaandSvenSchreiber ofGoetheUniversityFrankfurtfortheir
helpindevisingtorture-testsforgretl’sVECMcode.
Change format from pdf to jpg - Convert PDF to JPEG images in C#.net, ASP.NET MVC, WinForms, WPF project
How to convert PDF to JPEG using C#.NET PDF to JPEG conversion / converter library control SDK
convert pdf to jpg for online; bulk pdf to jpg converter
Change format from pdf to jpg - VB.NET PDF Convert to Jpeg SDK: Convert PDF to JPEG images in vb.net, ASP.NET MVC, WinForms, WPF project
Online Tutorial for PDF to JPEG (JPG) Conversion in VB.NET Image Application
batch pdf to jpg converter online; c# pdf to jpg
Chapter27. CointegrationandVectorErrorCorrectionModels
251
point).
Thesolution(orlackthereof)maybesensitivetotheinitialvalueselectedfor. Bydefault,gretl
selects astarting point using adeterministic method based on Boswijk (1995), buttwo o further
supplyanexplicitinitialvaluefor.
Thedefaultinitializationmethodis:
1. CalculatetheunrestrictedML
ˆ
usingtheJohansenprocedure.
2. Iftherestrictiononisnon-homogeneous,usethemethodproposedbyBoswijk:
0
 I
r
ˆ
?
0
H
I
r
ˆ
?
0
h
0
(27.9)
where
ˆ
0
?
ˆ
0andA denotestheMoore–PenroseinverseofA.Otherwise
0
H
0
H
1
H
0
vec
ˆ

(27.10)
3. vec
0
H
0
h
0
.
4. CalculatetheunrestrictedML L ˆconditionalon
0
,asperJohansen:
ˆ
S
01
0

0
0
S
11
0
1
(27.11)
5. Ifisrestrictedbyvec
0
,then
0
G
0
G
1
G
0
vecˆ
0
andvec
0
0
0
.
Alternativeinitializationmethods
Thebasicideaisthis:westartatacertainpointintheparameterspace,andforeachofniterations
anddeterminethelikelihoodatthenewpoint.Ifthelikelihoodishigher,wejumptothenewpoint;
otherwise,wejumpwithprobabilityP(andremainatthepreviouspointwithprobability1 P).As
isreduced,asistheprobabilityofmakingajumpwhenthelikelihoodfailstoincrease.
Inthecourseofthisproceduremanypointsintheparameterspaceareevaluated,startingwiththe
pointarrivedatbythedeterministicmethod,whichwe’llcall
0
.Oneofthesepointswillbe“best”
inthesenseofyieldingthehighestlikelihood:callit
.Thispointmayormaynothaveagreater
likelihoodthan
0
.Andtheprocedurehasanendpoint,
n
,whichmayormaynotbe“best”.
Therulefollowedbygretlinselectinganinitialvalueforbasedonsimulatedannealingisthis:use
if
>
0
,otherwiseuse
n
.Thatis,ifwegetanimprovementinthelikelihoodviaannealing,
wemakefulluseofthis;ontheotherhand,ifwefailtogetanimprovementwenonethelessallow
theannealingto randomizethestartingpoint. . Experimentsindicatethatthelatter r eﬀectcanbe
Besidesannealing,afurtheralternativeismanualinitialization. Thisisdonebypassingaprede-
ﬁnedvectortothesetcommandwithparameterinitvals,asin
set initvals myvec
Thedetailsdependonwhethertheswitchingalgorithmor LBFGSisused. . Fortheswitchingalgo-
rithm,therearetwooptionsforspecifyingtheinitialvalues. Themoreuser-friendlyone(formost
people,wesuppose)istospecifyamatrixthatcontainsvecfollowedbyvec.Forexample:
Online Convert Jpeg to PDF file. Best free online export Jpg image
try out some settings and then create the PDF files with the button at the bottom. The perfect conversion tool. JPG is the most widely used image format, but we
convert online pdf to jpg; convert pdf to jpg converter
C# PDF Convert to Images SDK: Convert PDF to png, gif images in C#
You can also directly change PDF to Gif image file in C# program. // Load a PDF file. Description: Convert all the PDF pages to target format images and
convert pdf pictures to jpg; convert pdf into jpg format
Chapter27. CointegrationandVectorErrorCorrectionModels
252
open denmark.gdt
vecm 2 1 1 LRM M LRY IBO IDE --rc c --seasonals
matrix BA = {1, -1, , 6, , -6, -6, , -0.2, , 0.1, , 0.02, , 0.03}
set initvals BA
restrict
b[1] = = 1
b[1] + + b[2] ] = 0
b[3] + + b[4] ] = 0
end restrict
In this s example—from Johansen (1995)—the cointegration rank k is 1and there e are 4variables.
However,themodelincludesarestrictedconstant(the--rcﬂag)sothathas5elements. The

1
;
2
;
3
;
4
;
5
;
1
;
2
;
3
;
4
Theotheroption,whichiscompulsorywhenusingLBFGS,istospecifytheinitialvaluesinterms
ofthefreeparameters,and .Gettingthisrightissomewhatlessobvious.Asmentionedabove,
theimplicit-formrestrictionRvecqhasexplicitformvecHh
0
,whereHR
?
,the
right nullspace of R. Thevector is shorter, bythe e number r ofrestrictions, , than n vec. The
savvyuserwillthenseewhatneedstobedone. Theotherpointtotakeintoaccountisthatifis
unrestricted,theeﬀectivelengthof is0,sinceitisthenoptimaltocomputeusingJohansen’s
formula,conditionalon(equation27.11above).Theexampleabovecouldberewrittenas:
open denmark.gdt
vecm 2 1 1 LRM M LRY IBO IDE --rc c --seasonals
matrix phi = {-8, -6}
set initvals phi
restrict --lbfgs
b[1] = = 1
b[1] + + b[2] ] = 0
b[3] + + b[4] ] = 0
end restrict
Inthismoreeconomicalformulationtheinitializerspeciﬁesonlythetwofreeparametersin(5
elementsinminus3restrictions). Thereisnocalltogivevaluesfor sinceisunrestricted.
Scaleremoval
Considerasimplerversionoftherestrictiondiscussedintheprevioussection,namely,
restrict
b[1] = = 1
b[1] + + b[2] ] = 0
end restrict
Thisrestrictioncomprisesasubstantive,testablerequirement—that
1
and
2
sumtozero—and
anormalizationor scaling,
1
1. Thequestionarises, , mightitbeeasierandmorereliableto
maximizethelikelihoodwithout imposing
1
 1?
10
Ifso, wecould recordthis normalization,
removeitforthepurposeofmaximizingthelikelihood,thenreimposeitbyscalingtheresult.
Unfortunately itis notpossible to o sayinadvance e whether r “scaleremoval”ofthis sort t will give
betterresultsforanyparticularestimationproblem.However,thisdoesseemtobethecasemore
oftenthannot.Gretlthereforeperformsscaleremovalwherefeasible,unlessyou
10
Asanumericalmatter,thatis.Inprinciplethisshouldmakenodiﬀerence.
Online Convert PDF to Jpeg images. Best free online PDF JPEG
JPG is the most common image format on the internet. The outputs of our conversion service are always JPG files to even if pictures are saved in a PDF in other
pdf to jpg converter; convert pdf file to jpg online
JPEG Image Viewer| What is JPEG
JPEG, JPG. enabling you to quickly convert your JPEG images into other file formats, including Bitmap, Png, Gif, Tiff, PDF, MS-Word, etc More Format Information.
convert pdf file to jpg on; changing file from pdf to jpg
Chapter27. CointegrationandVectorErrorCorrectionModels
253
 explicitlyforbidthis,bygivingthe--no-scalingoptionﬂagtotherestrictcommand;or
 provideaspeciﬁcvectorofinitialvalues;or
 selecttheLBFGSalgorithmformaximization.
Scaleremoval is deemedinfeasibleifthere areanycross-columnrestrictions on, or r any y non-
homogeneousrestrictionsinvolvingmorethanoneelementof.
justidentiﬁedwiththenormalization(s)included,sowedonotdoitinthatcase.By“justidentiﬁed”
wemeanthatthesystemwouldnotbeidentiﬁedifanyoftherestrictionswereremoved. Onthat
criteriontheaboveexampleisnotjustidentiﬁed,sincetheremovalofthesecondrestrictionwould
notaﬀectidentiﬁcation;andgretlwouldinfactperformscaleremovalinthiscaseunlesstheuser
speciﬁedotherwise.
C# Create PDF from images Library to convert Jpeg, png images to
Batch convert PDF documents from multiple image formats, including Jpg, Png, Bmp, Gif, Tiff If you want to turn PDF file into image file format in C#
c# convert pdf to jpg; convert pdf to jpeg
C# Image: How to Download Image from URL in C# Project with .NET
If you want other format, you can use the image you can also save a gif, jpeg / jpg, or bmp provide powerful & profession imaging controls, PDF document, tiff
to jpeg; change pdf to jpg file
Chapter28
Multivariatemodels
By amultivariatemodelwemeanonethat includesmorethan onedependent variable. . Certain
speciﬁctypesofmultivariatemodelfortime-seriesdataarediscussedelsewhere:chapter26deals
withVARsandchapter27withVECMs. Herewediscusstwogeneralsortsofmultivariatemodel,
implementedingretlviathesystemcommand: SUR R systems(SeeminglyUnrelatedRegressions),
inwhichalltheregressorsaretakentobeexogenousandinterestcentersonthecovarianceofthe
errortermacrossequations;andsimultaneoussystems,inwhichsomeregressorsareassumedto
beendogenous.
Inthischapterwegiveanaccountofthesyntaxanduseofthesystemcommandanditscompan-
ions, restrictandestimate; wealso explaintheoptionsandaccessorsavailableinconnection
withmultivariatemodels.
28.1 Thesystemcommand
Thespeciﬁcationofamultivariatesystemtakestheformofablockofstatements, starting with
system and ending with h end d system. . Oncea a system is speciﬁed it can estimated via various
methods, usingtheestimate command, withorwithoutrestrictions, whichmaybeimposedvia
therestrictcommand.
Startingasystemblock
Theﬁrstlineofasystemblockmaybeaugmentedineither(orboth)oftwoways:
 An n estimationmethod is speciﬁed for r the e system. . This s is done e by followingsystem with
anexpressionoftheformmethod=estimator,whereestimator mustbeoneofols(Ordinary
LeastSquares),tsls(Two-StageLeastSquares),sur(SeeminglyUnrelatedRegressions),3sls
(Three-StageLeast Squares), liml l (Limited Information n MaximumLikelihood)or r fiml (Full
InformationMaximumLikelihood).Twoexamples:
system method=sur
system method=fiml
OLS,TSLSandLIMLare,ofcourse,single-equationmethodsratherthantruesystemestima-
tors;theyareincludedtofacilitatecomparisons.
 Thesystemis s assignedaname. . Thisisdonebygiving g thenameﬁrst, followedbyaback-
arrow,“<-”,followedbysystem. Ifthenamecontainsspacesitmustbeenclosedindouble-
quotes.Herearetwoexamples:
sys1 <- system
"System 1" " <- - system
Note,however,thatthisnamingmethodisnotavailablewithinauser-deﬁnedfunction,only
inthemainbodyofagretlscript.
Iftheinitialsystemlineisaugmentedintheﬁrstway,theeﬀectisthatthesystemisestimatedas
soonasitsdeﬁnitioniscompleted,usingthespeciﬁedmethod. Theeﬀectofthesecondoptionis
254
VB.NET Word: Word to JPEG Image Converter in .NET Application
Word doc into high quality jpeg / jpg images; Convert a be converted into Jpeg image format and then powerful & profession imaging controls, PDF document, image
change pdf to jpg online; change file from pdf to jpg on
C# PDF Convert to Tiff SDK: Convert PDF to tiff images in C#.net
Powerful .NET control to batch convert PDF documents to tiff format in Visual C# .NET program. Also supports convert PDF files to jpg, jpeg images.
Chapter28. Multivariatemodels
255
thatthesystemcanthenbereferencedbytheassignednameforthepurposesoftherestrictand
tothe“Sessionview”.
Thesetwopossibilitiescanbecombined,asin
mysys <- - system m method=3sls
Inthis examplethesystem is estimated immediately viaThree-Stage e Least Squares, , and is also
availableforsubsequentuseunderthenamemysys.
Ifthesystemisnotnamedviatheback-arrowmechanism,itisstillavailableforsubsequentuse
viarestrictandestimate;inthiscaseyoushouldusethegenericname\$systemtorefertothe
last-deﬁnedmultivariatesystem.
Thebodyofasystemblock
Themostbasicelementinthebodyofasystemblockistheequationstatement,whichisused
tospecifyeachequationwithinthesystem. Thistakesthesameformastheregressionspeciﬁca-
tionforsingle-equationestimators,namelyalistofserieswiththedependentvariablegivenﬁrst,
followedbytheregressors, with theseries given either bynameor by IDnumber r (order r in n the
dataset). Asystemblockmustcontainatleasttwoequationstatements,andforsystemswithout
endogenous regressorsthesestatementsareallthatisrequired. . So, , for example,aminimalSUR
speciﬁcationmightlooklikethis:
system method=sur
equation y1 const t x1
equation y2 const t x2
end system
Forsimultaneoussystemsitisnecessarytodeterminewhichregressorsareendogenousandwhich
exogenous.Bydefaultallregressorsaretreatedasexogenous,exceptthatanyvariablethatappears
asthedependentvariableinoneequationisautomaticallytreatedasendogeousifitappearsasa
regressorelsewhere. However,anexplicitlistofendogenousregressorsmaybesuppliedfollow-
ingtheequationslines: thistakestheformofthekeywordendogfollowedbythenamesor r ID
numbersoftherelevantregressors.
WhenestimationisviaTSLSor3SLSitispossibletospecifyaparticularsetofinstrumentsforeach
equation. This s is donebygivingtheequationlistsintheformatusedwiththetslscommand:
ﬁrstthedependentvariable,thentheregressors,thenasemicolon,thentheinstruments,asin
system method=3sls
equation y1 const t x11 1 x12 ; ; const t x11 z1
equation y2 const t x21 1 x22 ; ; const t x21 z2
end system
Analternativewayofspecifyinginstrumentsistoinsertanextralinestartingwithinstr,followed
bythelistofvariablesactingasinstruments.Thisisespeciallyusefulforspecifyingthesystemwith
theequationskeyword,seethefollowingsubsection.Asintsls,anyregressorsthatarenotalso
listedasinstrumentsaretreatedasendogenous,sointheexampleabovex11andx21aretreated
asexogenouswhilex21andx22areendogenous,andinstrumentedbyz1andz2respectively.
Onemoresortofstatementisallowedinasystemblock:thatis,thekeywordidentityfollowedby
anequationthatdeﬁnesanaccountingrelationship,ratherthenastochasticone,betweenvariables.
Forexample,
identity Y = C + + I I + G + X
Therecanbemorethanoneidentityinasystemblock.Butnotethatthesestatementsarespeciﬁc
toestimationviaFIML;theyareignoredforotherestimators.
VB.NET Image: How to Create Visual Basic .NET Windows Image Viewer
If you need a format conversion, it is also available including png, jpeg, gif, tiff, bmp, PDF, and Word from that, you are entitled to change the orientation
convert pdf file to jpg format; best program to convert pdf to jpg
VB.NET PDF - Convert PDF with VB.NET WPF PDF Viewer
Split PDF Document; Remove Password from PDF; Change PDF Permission Settings. Export PDF to TIFF file format. Convert PDF to image formats, such as PNG, JPG, BMP
convert pdf photo to jpg; .pdf to jpg
Chapter28. Multivariatemodels
256
Equationsystemswithinfunctions
Itisalsopossibletodeﬁneamultivariatesysteminaprogrammaticway.Thisisusefuliftheprecise
aregivenwhenthescriptisactuallyrun.
1
Therelevantsyntaxisgivenbytheequationskeyword(notetheplural),whichreplacestheblock
ofequationlinesinthestandardform. Anequationslinerequirestwolistarguments. Theﬁrst
listmustcontainallseriesontheleft-handsideofthesystem;thusthenumberofelementsinthis
ﬁrstlistdeterminesthenumberofequationsinthesystem.Thesecondlistisa“listoflists”,which
isaspecialvariantofthelistdatatype.Thatis,foreachequationofthesystemyoumustprovidea
listofright-handsidevariables,andthelistsforallequationsmustbejoinedbyassigningthemto
anotherlistobject;inthatassignment,theymustbeseparatedbyasemicolon.Hereisanexample
foratwo-equationsystem:
list syslist = xlist1 ; xlist2
Therefore, specifying a a system generically in this way y just t involves s building the necessary y list
arguments,asshowninthefollowingexample:
open denmark
list LHS S = = LRM LRY
list RHS1 = const LRM(-1) IBO(-1) IDE(-1)
list RHS2 = const LRY(-1) IBO(-1)
list RHS S = = RHS1 ; RHS2
system method=ols
equations LHS S RHS
end system
Asmentionedabove, theoptionof assigningaspeciﬁc nameto asystemisnotavailablewithin
functions,butthegenericidentiﬁer\$systemcanbeusedtosimilareﬀect. Thefollowingexample
shows how one e can deﬁnea system, estimateit via two o methods, apply y a restriction, , then n re-
estimateitsubjecttotherestriction.
function void d anonsys(series x, series y)
system
equation x x const
equation y y const
end system
estimate \$system method=ols
estimate \$system method=sur
restrict \$system
b[1,1] - b[2,1] = 0
end restrict
estimate \$system method=ols
end function
28.2 Restrictionandestimation
Thebehavioroftherestrictcommandisalittlediﬀerentformultivariatesystemsascompared
withsingle-equationmodels.
Inthesingle-equationcase,restrictreferstothelast-estimatedmodel,andoncethecommandis
completedtherestrictionistested.Inthemultivariatecase,youmustgivethenameofthesystem
towhichtherestrictionis to beapplied(or\$systemtoreferto thelast-deﬁnedsystem),andthe
1
Chapter28. Multivariatemodels
257
eﬀectofthecommandisjusttoattachtherestrictiontothesystem;testingisnotdoneuntilthe
estimatesoftherestrictedmodel;ifyouarenotinterestedinthefullestimatesandjustwantthe
teststatisticyoucanappendthe--quietoptiontoestimate.
Agivensystemrestrictionremainsinforceuntilitisreplacedorremoved. Toreturnasystemto
itsunrestrictedstateyoucangiveanemptyrestrictblock,asin
restrict sysname
end restrict
Asillustratedabove,youcanusethemethodtagtospecifyanestimationmethodwiththeestimate
isusedagain.
Theestimate commandis themainlocus for options regardingthedetails of estimation. . The
availableoptionsareasfollows:
 IftheestimationmethodisSURor3SLSandthe--iterateﬂagisgiven,theestimatorwillbe
iterated. InthecaseofSUR,iftheprocedureconvergestheresultsaremaximumlikelihood
estimates.Iterationofthree-stageleastsquares,however,doesnotingeneralconvergeonthe
full-informationmaximumlikelihoodresults.Thisﬂagisignoredforotherestimators.
greesoffreedomcorrectionwhencalculatingstandarderrors. Thiscanbesuppressedusing
the--no-df-corrﬂag. Thisﬂaghasnoeﬀectwiththeotherestimators;nodegreesoffree-
domcorrectionisappliedinanycase.
 By y default, , theformula a used in calculating the elements s of thecross-equation covariance
matrixis
ˆ
ij
ˆu
0
i
ˆu
j
T
where is s the e sample size and d ˆu
i
is the e vector of residuals s from equation i. But t if the
ˆ
ij
ˆu
0
i
ˆu
j
q
T k
i
T k
j
wherek
i
denotesthenumberofindependentparametersinequationi.
 Ifaniterativemethodisspeciﬁed, , the--verboseoptioncallsfor printingofthedetailsof
theiterations.
 Whenthesystemestimator r isSUR or 3SLSthecross-equationcovariancematrix x isinitially
estimatedviaOLSor TSLS, respectively. . Inthecaseofasystemsubjecttorestrictions s the
question arises: : should d theinitialsingle-equation estimator r berestricted d or unrestricted?
Thedefaultistheformer,butthe--unrestrict-initﬂagcanbeusedtoselectunrestricted
initialization. (Notethatthisisunlikelytomakemuchdiﬀerenceifthe--iterateoptionis
given.)
28.3 Systemaccessors
Aftersystemestimationvariousmatricesmayberetrievedforfurtheranalysis. Letdenotethe
number of equationsin n the systemandletdenotethetotalnumber r ofestimated parameters
(
P
i
k
i
). Theaccessors s \$uhat and\$yhatgetTgmatricesholding theresiduals andﬁtted
valuesrespectively. Theaccessor\$coeffgetsthestackedK-vectorofparameterestimates;\$vcv
Chapter28. Multivariatemodels
258
getstheKKvariancematrixoftheparameterestimates;and\$sigmagetstheggcross-equation
covariancematrix,
ˆ
Ö.
AteststatisticforthehypothesisthatÖisdiagonalcanberetrievedas\$diagtestanditsp-value
as\$diagpval. ThisistheBreusch–Pagantestexceptwhentheestimatoris(unrestricted)iterated
SUR,inwhichcaseit’saLikelihoodRatiotest.TheBreusch–Pagantestiscomputedas
LMT
g
X
i2
iX1
j1
r
2
ij
wherer
ij
ˆ
ij
=
q
ˆ
ii
ˆ
jj
;theLRtestis
LRT
0
@
g
X
i1
logˆ
2
i
logj
ˆ
Öj
1
A
where ˆ
2
i
is ˆu
0
i
ˆu
i
=T fromtheindividualOLSregressions. Inbothcases s theteststatisticis dis-
tributedasymptoticallyas
2
withgg 1=2degreesoffreedom.
Structuralandreducedforms
Systemsofsimultaneoussystemscanberepresentedinstructuralformas
y
t
A
1
y
1
A
2
y
2
A
p
y
t p
Bx
t
t
wherey
t
represents thevectorofendogenousvariablesinperiodtx
t
denotesthevectorofex-
ogenousvariables,andpisthemaximumlagoftheendogenousregressors. Thestructural-form
matricescanberetrievedas\$sysGamma,\$sysAand\$sysB respectively. . Ify
t
ism1andx
t
is
n1,then— ismmandBismn.Ifthesystemcontainsnolagsoftheendogenousvariables
thentheAmatrixisnotdeﬁned,otherwiseAisthehorizontalconcatenationofA
1
;:::;A
p
,andis
thereforemmp.
Fromthestructuralformitisstraightforwardtoobtainthereducedform,namely,
y
t
—
1
0
@
p
X
i1
A
i
y
t i
1
A
—
1
Bx
t
v
t
wherev
t
—
1
t
.Thereducedformisusedbygretltogenerateforecastsinresponsetothefcast
command. Thismeansthat—incontrastto o single-equationestimation—thevaluesproducedvia
fcastforastatic,within-sampleforecastwillingeneraldiﬀerfromtheﬁttedvaluesretrievedvia
\$yhat.Theﬁttedvaluesforequationirepresenttheexpectationofy
ti
conditionalonthecontem-
poraneousvaluesofalltheregressors,whilethefcastvaluesareconditionalontheexogenous
andpredeterminedvariablesonly.
TheaboveaccounthastobequaliﬁedforthecasewhereasystemissetupforestimationviaTSLS
or3SLSusingaspeciﬁclistofinstrumentsperequation,asdescribedinsection28.1. Inthatcase
itispossibletoincludemoreendogenousregressorsthanexplicitequations(although,ofcourse,
theremustbesuﬃcientinstrumentsto achieveidentiﬁcation). . Insuch h systems endogenous re-
gressorsthathavenoassociatedexplicitequationaretreated“asif”exogenouswhenconstructing
thestructural-formmatrices. Thismeansthatforecastsareconditionalontheobservedvaluesof
the“extra”endogenousregressorsratherthansolelyonthevaluesoftheexogenousandpredeter-
minedvariables.