This is an improved version for the codes for Rossi and Sekhposyan (2014) on "Evaluating Predictive Densities 
of U.S.Output Growth and Inflation in a Large Macroeconomic Data Set" published in IJF.

The code consists of two parts. The first part obtains the PITS based on ADL, Factor, VAR models,
as well as various specifications of the various versions of model averages. 

The second part runs the multitude of specification tests.

The results in the original paper are in the Results folder. Subsequenty, there was a change made to the BIC code,
as well as the MC(3) of the BMA, thus those results could differ a bit from the published version. None of this changes
make a difference in terms of the overall conclusions of the paper.

EXECUTING FILES
main.m - obtains the PITS for various specifications and saves them in a matlab data 
structure PITSgdp1, PITSgdp4, PITSpgdp1, PITSpgdp4

evaluationh1.m - runs the evaluation tests for the one-step-ahead PITS
evaluationh4.m - runs the evaluation tests for the four-step-ahead PITS
evaluationh1figures.m - obtains the figures included in the paper

FILES FOR OBTAINING PITS
a. Model averages
bmareg.m -  estimates a Bayesian regression model with a g-prior
covselection.m - implements the MC(3) algorithm for BMA 
modellikel.m - calculating model log-likelihood based on g-prior
prior.m - calibrates the prior

b. Factor models
ICP.m - selecting number of factors
pc.m - obtain normalized scores

c. VAR model 
varestimate.m -  estimates a Bayesian VAR

FILES FOR EVALUATING PITS
Berkowitz test - berkowitz.m, carloss.m, lx.m, testsofuniformityInvNorm.m
Doornik-Hansen test - DoornikHansen.m, testsofuniformityInvNorm.m
Andrews QLR test - pvcalc.m, pvqlrsb.txt, QLR_hac.m, testsofidentical.m
Ljung-Box test - testsofindependence.m
Kolmogorov-Smirnov and Anderson-Darling tests - testsofuniformity.m

SUPPORTING FILES
cleanNaN.m, demean.m, standard.m, mmult.m, nw.m
mbic.m - lag length selection based on BIC

DATA FILES
getData.m - obtains and organizes the data/transformations
Data.xls - data used in the estimation
DataPrior.xls - data used for calibrating the priors