Below is a list of all the procedures and example programs available on our website (excluding the Textbook Examples).
File Name  Description  
ablags.src  ABLags generates a VECT[SERIES] with the expanded panel data instruments for doing ArellanoBond instrumental variables estimation. Arellano, M. and S. Bond (1991). "Some Tests of Specification for Panel Data: Monte Carlo Evidence and an Application to Employment Equations.” Review of Economic Studies, Vol. 58, 277297. See also arellano.prg.
 
acf.src  ACF performs an autocorrelation analysis on a series. This is a simpler routine than the related BJIDENT and REGCORRS procedures.
 
acf2pacf.src  This computes a series of partial autocorrelations from a series of autocorrelations.
 
acfmorin.src  Takes as input a set of AR and MA coefficients, and generates the corresponding theoretical autocorrelations. Updated November 10, 1997, it can now produce autocovariances as well, and allows skipping beginning and ending items in the input vector. (Note: This procedure file was renamed from ACF.SRC to ACFMORIN.SRC in July, 2005 to avoid confusion with a newer ACF.SRC written by Estima and included with RATS starting with Version 6.10)
 
adaptive.rpf  Demonstrates adaptive kernel estimation: a twostep procedure for adjusting the estimates of a linear model based upon the an estimated density for the residuals. Uses the DENSITY instruction for computing the density and MCOV instruction for computing the adjustment matrices.
 
adfautoselect.src  This selects the optimal lag length for an ADF unit root test (it does not do the UR test itselfsee the Unit Root section for testing proceudres). This uses features of RATS 6.0 to report the results in a convenient format. It is largely based on a procedure found in Norman Morin's URADF.SRC file. Note: The filename was renamed from ADFAUTO.SRC (to match the name of the procedure itself) in August, 2005.
 
adsjbes2009.zip 
Replication file for Aruoba, Diebold and Scotti(2009), "RealTime
Measurement of Business Conditions," Journal of Business and Economic
Statistics, vol 27, no 4, 417427.
 
adtest.src  This implements the AndersonDarling test for normality.
 
agfractd.src  Estimates the fractional difference power for a series using the biasreduced technique from Andrews and Guggenberger(2003), "A BiasedReduced Logperiodogram Regression Estimator for the LongMemory Parameter", Econometrica, vol 71, no. 2, 675712.
 
akaike.rpf  Calculates and displays Akaike Information Criteria and Schwarz Bayesian Criteria for distributed lag models.
 
andrews.prg  is a (partial) example program demonstrating a technique for selecting a valid set of instruments for a GMM where some of the moment conditions are suspected of being incorrect. Based on a recent Econometrica paper by Donald Andrews. See August, 1999 RATSLetter for details.
 
apbreaktest.src  AndrewsPloberger, AndrewsQuandt tests for structural break in a linear regression using Hansen's pvalues. Andrews, Donald W. K. and Werner Ploberger, "Optimal Tests When a Nuisance Parameter is Present Only Under the Alternative", Econometrica, 1994.
 
apgradienttest.src 
AndrewsPloberger, AndrewsQuandt tests for structural break in a general maximum likelihood.
 
ar1.rpf  Estimates a linear regression model with AR1 errors using a variety of techniques (CochraneOrcutt, HildrethLu, maximum likelihood).
 
arautolags.src  Computes an information criterion for various lags of AR processes using the Burg or Yule estimates of the partial autocorrelations. Identifies the best choice for the given criterion.
 
archtest.src  Tests for ARCH effects in a series. Can do a single test for a set number of lags, or a sequence with different numbers of lags.
 
arellano_bond_restud1991.zip  Replication file for Arellano and Bond(1991), "Some Tests of Specification for Panel Data: Monte Carlo Evidence and an Application to Employment Equations", Review of Economic Studies, vol 58, no. 2, 27797.
 
arellano.rpf  Estimates a dynamic panel data model using ArellanoBond GMM estimation. Arellano, M. and S. Bond (1991). "Some Tests of Specification for Panel Data: Monte Carlo Evidence and an Application to Employment Equations.” Review of Economic Studies, Vol. 58, pp. 277297. See also ablags.src
 
arfsim.src  Procedure for generating true simulations from ARFIMA(0,d,0) using the Davies and Harte Method. Written by Rob Schoen. You can download the Zipped file ARFSIM.ZIP which includes the ARFIMA simulation procedure, a required Gamma function procedure, and a short example progra, or download the individual text files: ARFSIM.SRC, XGAMMA.SRC, and ARFSIM.PRG (example program).
 
argarchsim.rpf  Demonstrates simulation of a univariate (conditionally Normal) AR(1)GARCH(1,1) model
 
arima.rpf  Estimates, tests and forecasts ARIMA models. Demonstrates the BOXJENK and UFORECAST instructions, BJTRANS, BJIDENT, BJAUTOFIT and REGCORRS procedures.
 
armadlm.src 
Sets up the transition equation matrices for a statespace representation
of an ARMA mode. The procedure takes an input ARMA equation you supply and
sets up appropriate "A" and "SW" matrices.
 
armagibbs.rpf  Example of analysis of an ARMA model using Gibbs sampling (Independence Chain Monte Carlo).
 
armaspectrum.src  This produces a graph of the spectral density for an input ARMA model, where the model is in the form of an equation. (Renamed and revised from the older ARMASPEC.SRC file).
 
armax.prg  Estimates ARMA models with extra regressors (ARMAX models).
 
autobox.rpf  Uses @BJDIFF and @GMAUTOFIT to do an automated choice for the differencing and seasonal ARIMA specification for a series, then uses BOXJENK to estimate the chosen model, allowing for automated outlier detection.
 
bai_lumsdaine_stock_restat1998.zip 
Replication file for Bai, Lumsdaine and Stock(1998),
"Testing For and Dating Common Breaks in Multivariate Time Series",
Review of Economic Studies, vol 65, no 3, 395432
 
bai_perron_jae2003.zip  Replication file for empirical examples from Bai & Perron(2003), "Computation and analysis of multiple structural change models," Journal of Applied Econometrics, vol. 18, no. 1, pages 122.
 
baillie_bollerslev_jbes1989.zip  Replication file for Baillie and Bollerslev, "The Message in Daily Exchange Rates: A Conditional Variance Tale", JBES 1989, vol 7, pp 297305 which estimates univariate GARCH models with dayoftheweek effects.
 
bailliebw1996.zip 
Replication of Baillie, Bollerslev and Mikkelson(1996),
"Fractionally Integrated Generalized Autoregressive Conditional Heteroskedasticity",
Journal of Econometrics, vol 74, pp 330.
 
baing.src  Estimates the required number of factors in a linear factor model using the formulas in Bai and Ng(2002), "Determining the Number of Factors in Approximate Factor Models", Econometrica, vol 70, 191222.
 
baiperron.src  This does multiple structural change analysis as described in Bai and Perron (2003), "Computation and Analysis of Multiple Structural Change Models", Journal of Applied Econometrics, vol. 18, 122.
 
balcilarguptamiller_ee2015.zip  Replication of Balcilar, Gupta, Miller(2015), "Regime switching model of US crude oil and stock market prices: 1859 to 2013", Energy Economics, vol 49, 317327. Analysis of a Markov Switching Vector Error Correction Model (MSVECM).
 
balke_restat2000.zip 
Replication file for Balke(2000),
"Credit and Economic Activity: Credit Regimes and Nonlinear Propagation of Shocks,"
Review of Economics and Statistics, vol 82, 344349.
 
balkefombyier1997.zip  Replication of Balke and Fomby(1997), "Threshold Cointegration," International Economic Review, vol 38, no 3, 62745.
 
basicforecast.rpf  Example of simple forecast procedures.
 
basics.prg  Demonstrates transformations (SET and FILTER instructions), time series and scatter graphics (GRAPH and SCATTER), multiple linear regression (LINREG), hypothesis testing instructions (EXCLUDE, TEST and RESTRICT), simple forecasting (UFORECAST).
 
bauwens_laurent_jbes2005.zip  Replication file for Bauwens and Laurent(2005), "A New Class of Multivariate Skew Densities, With Application to Generalized Autoregressive Conditional Heteroscedasticity Models," JBES, vol 23, 346354.
 
bayestst.src  Tests series for a unit root using the Bayesian procedure outlined in C. Sims, "Bayesian Skepticism on Unit Root Econometrics", J. of Economic Dynamics and Control, 1988 no. 2/3.
 
bbeqje2005.zip  Replication for Bernanke, Boivin & Eliasz (2005), "Measuring the Effects of Monetary Policy: A Factoraugmented Vector Autoregressive (FAVAR) Approach," The Quarterly Journal of Economics, vol. 120(1), pages 387422.
 
bdindtests.src  Performs the battery of independence tests used extensively in Brockwell and Davis (2002), "Introduction to Time Series and Forecasting" 2nd ed, Springer.
 
bdstest.src  Computes the Brock, Dechert, & Scheinkman Test (BDS) test for i.i.d., "A test of independence based on the correlation dimension" (working paper title). Included in Brock, Hsieh and LeBaron, "Nonlinear Dynamics,Chaos,and Instability", MIT Press, 1993, Chap. 2.
 
bernankemihovqje1998.zip 
Replication files for Bernanke & Mihov(1998), "Measuring Monetary Policy", QJE, vol 113, no 3, 869902
(monthly data calculations).
 
betaparms.src  Returns a 2vector with the two parameters for a Beta distribution with the given mean and standard deviation
 
betas.rpf  Estimates beta coefficients for a large number of stocks. Demonstrates use of looping instructions.
 
bicorrtest.src  Computes the "C" and "H" portmanteau statistics for autocorrelation and third order dependence, from Hinich, M. (1996). "Testing for dependence in the input to a linear time series model." Journal of Nonparametric Statistics, 6, 205221.
 
bif.src  Given unusual events that do not fit adequately into a specified model and that manifiest themselves as high leverage points or as outliers, BIF implements the Bounded Influence Function Regression, a robust estimation proposed by Krasker, Ku, and Welsch (1983). This method downweights the influence of potentially influential observations avoiding relatively large contribution to the values of the estimates.
 
bivariatehp.rpf  Example of a bivariate HP filter.
 
bjautofit.src  BJAutofit chooses the minimum AICC or BIC model for the dependent variable. It uses maximum likelihood estimation to ensure that the estimates are done over a consistent time interval.
 
bjdiff.src  Generates a table of Schwarz criteria for various combinations of differencings and mean extractions, as a preliminary step in BoxJenkins modeling.
 
bjest.src  Updated version of BJEST procedure included with RATS (for estimating ARIMA models). This version features more options and improved graphics.
 
bjfore.prg  Demonstrates forecasting with ARIMA models.
 
bjfore.src  Estimates and forecasts an ARIMA model
 
bjident.src  Computes and graphs autocorrelations and partial autocorrelations of a series and its differences to aid in choosing an ARIMA model
 
bjornland_leitemo_jme_2009.zip 
Replication file for Bjørnland, Hilde C. and Kai Leitemo (2009),
"Identifying the Interdependence between US Monetary Policy and the Stock Market".
Journal of Monetary Economics, vol 56, pp 275282.
 
bjtheil.src  This computes Theil U statistics for a BoxJenkins ARIMA model.
 
bjtrans.src  This does offset graphs of the levels, square root and log of an input series to help determine which preliminary transformation is appropriate.
 
bkfilter.src  Implements a band pass filter on a series using the methods of Baxter and King (1999) "Measuring business cycles: Approximate bandpass filters for economic time series", Review of Economics and Statistics, vol 81, no. 4, 575593. Revised and updated by Estima, and renamed as BKFILTER (to avoid confusion with other band pass filtering procedures).
 
blanchardquahaer1989.zip  Replication for Blanchard and Quah(1989), "The Dynamic Effects of Aggregate Demand and Supply Disturbances", AER, vol 79, no. 4, pp 655673. Demonstrates several topics in VAR's: historical decomposition, recovery of structural shocks, longrun restrictions.
 
blockboot.src  BlockBoot is an alternative to the BOOT instruction which does block draws. You use the output "boot" SERIES[INTEGERS] to do the resampling that you require. The BOOT instruction in RATS version 6.30 and later includes options for doing the same thing (and more).
 
blsunit1.src  Recursive minimum unit root test. Banerjee, Lumsdaine and Stock(1992), "Recursive and sequential tests of the unitroot and trendbreak hypothesis: theory and international evidence", JBES, vol. 10, 271287.
 
blsunit2.src  Rolling minimum unit root test. Based largely on a 1992 paper by Banerjee, Lumsdaine, and Stock.
 
blsunit3.src  Sequential minimum unit root test. Based largely on a 1992 paper by Banerjee, Lumsdaine, and Stock.
 
bndecomp.src 
Performs the BeveridgeNelson decomposition on a single series.
(See MVBNDECOMP.SRC for multivariate decomposition).
 
bollerslev_mikkelson_joe1996.zip 
Replication file for
Bollerslev and Mikkelson(1996),
"Modeling and pricing long memory in stock market volatility",
Journal of Econometrics, vol 73, pp 151184.
 
bonds.rpf  Estimates a term structure from a set of bond yields. Demonstrates estimation with a function which can't be written in closed form.
 
bondspline.rpf  Estimates a yield curve using a cubic spline approximation to the discount function, as described in McCulloch(1971), "Measuring the Term Structure of Interest Rates", Journal of Business, vol 44, pp 1931.
 
bootarma.rpf 
Demonstrates bootstrapping of an ARMA Model.
 
bootcointegration.rpf  Example of bootstrapping an FMOLS estimate of cointegrating vectors. Based upon the technique described in Li and Maddala, "Bootstrapping cointegrating regressions", J. of Econometrics 80 (1997) pp 297318
 
bootfgls.rpf  Example of bootstrapping linear model with estimated heteroscedasticity correction.
 
boots.src  Used with MODES.SRC, this bootstraps series and tests against an alternative number of modes. Requires MBKERNEL.SRC (a strippeddown version of the KERNEL.SRC procedure). Also available are MBDEMO.PRG and GDPQ.RAT, a sample program and data file. Or download MODES.ZIP which contains all of the above.
 
bootsimple.rpf  Tests the mean of a sample using bootstrapping. Demonstrates the BOOT instruction.
 
bootspectrum.rpf  Example of bootstrapping a spectral density. Algorithm from Franke and Hardle(1992) "On Bootstrapping Kernel Spectral Estimates", Annals of Statistics, vol. 20, no 1, 121145.
 
bootvar.rpf  Example of bootstrapping a simple VAR to get error bands on the impulse responses.
 
bootvecm.rpf  Does a parametric bootstrap (to get error bands for an IRF) of a VECM with known cointegrating vector.
 
boxcox.prg  Shows several methods for estimating a BoxCox model by maximum likelihood. Demonstrates MAXIMIZE, NLLS with the JACOBIAN option and a grid search using FIND.
 
bppaneltests.src  Tests the residuals from a least squares regression for presence of random effects using variants of the BreuschPagan LM test. It produces the standard BP test (which has chisquared asymptotics), the Honda onesided form (which has N(0,1) asymptotics) and the SLM (standardized Lagrange Multiplier) which is similar to the Honda test but uses smallsample corrections for the mean and standard deviation.
 
bqdodraws.src 
Alternate to MCVARDoDraws which does Monte Carlo draws for a 2variable BQ factorization.
 
breitung.src  Implements panel unit root tests from Breitung(2000), "The local power of some unit root tests for panel data", from Baltagi, Fomby, Hill (eds), "Nonstationary Panels, Panel Cointegration, and Dynamic Panels (Advances in Econometrics, Volume 15)", Emerald Group Publishing, pp.161177
 
bryboschan.src 
Implements the BryBoschan (NBER) Business Cycle Dating Algorithm.
Can be applied to either monthly data (BryBoschan) or quarterly data(PaganHarding).
 
bsoption.src  BSOPTION computes the value of an option using the BlackScholes formula. See e.g. Campbell, Lo and MacKinlay, "The Econometrics of Financial Markets", Princeton University Press, 1997. This is the same procedure file that is included with RATS. Revised in March, 2007, to use options, rather than a list of parameters.
 
burnsidejbes1994.zip  Replication of Burnside(1994), "HansenJagannathan Bounds as Classical Tests of AssetPricing Models," Journal of Business & Economic Statistics, vol. 12, no 1, pages 5779.
 
cagan.rpf  Estimates a dynamic model using the combination of DSGE and DLM. RATS Version 8, User's Guide, Example 10.4.
 
camacho_jel2011.zip  Replication file for Camacho(2011), "Markovswitching models and the unit root hypothesis in real U.S. GDP", Economics Letters, vol. 112, 161164
 
campbellammerjof1993.zip  Replication for Campbell and Ammer(1993), "What Moves the Stock and Bond Markets? A Variance Decomposition for LongTerm Asset Returns", J of Finance, vol 48, pp 337.
 
cancorr.src  Computes the canonical correlations and related statistics for two sets of series, possibly conditioning on the third set.
 
canmodel.rpf  Demonstrates process for selecting the prior in a Bayesian VAR. Example of the SPECIFY instruction in SYSTEM definition, including standard symmetric priors and a general prior.
 
cappiello_engle_sheppard_jfe2006.zip  Example of twostep estimates of various DCC models. This is the technique described in Cappiello, Engle & Sheppard(2006), "Asymmetric Dynamics in the Correlations of Global Equity and Bond Returns," Journal of Financial Econometrics, vol. 4, no 4, pages 537572 applied to a different data set.
 
carstensenjbes2006.zip  Replication file for Kai Carstenson(2006), "Stock Market Downswing and the Stability of European Monetary Union Money Demand", JBES, vol 24, number 4, pp 395402. Includes procedure and data files. Demonstrates FM OLS techniques and a Hansen stability test.
 
casskoopmans.rpf 
Solves the CassKoopmans growth model.
 
catsmisc.src  Updated CATS file for use with CATSIRFS.PRG.
 
causal.rpf  Demonstrates several forms of bivariate causality tests, including the standard lag exclusion Granger method, Sims and GewekeMeeseDent versions of the distributed lag method.
 
cecchetirich_jbes2001.zip 
Replication files for Cecchetti and Rich(2001),
"Structural Estimates of the U.S. Sacrifice Ratio," JBES, vol. 19, no 4, 416427.
 
cfeat.src  Program for the determination of the turning points of the time series, calculation of the duration and amplitude of the expansions and recessions. The expansion (recession) is defined as a timespan between a cyclical trough (peak) and peak (trough). The amplitude hence is the absolute distance between trough (peak) and peak (trough).
 
cffilter.src  This implements a generalized version of the BaxterKing bandpass filter developed by Christiano and Fitzgerald(2003), "The Band Pass Filter", International Economic Review, vol. 44, no. 2, 435465. (Renamed from BPASS.SRC in July, 2005, to avoid confusion with other band pass filter procedures).
 
chanmaheujbes2002.zip  Replication file for Chan and Maheu(2002), "Conditional Jump Dynamics in Stock Market Returns", JBES, vol 20, no. 3, 377389. This does constant and timevarying intensity (ARJI) models.
 
chanmcaleer_afe2003.zip  Replication file for Felix Chan & Michael McAleer(2003), "Estimating smooth transition autoregressive models with GARCH errors in the presence of extreme observations and outliers," Applied Financial Economics, vol. 13, no 8, 581592.
 
chankarolyi.rpf 
Example of GMM with multiple conditions using NLSYSTEM.
 
chow1.rpf  Demonstrates several ways to compute a "Chow" test for structural break at a known point with two or more samples. Shows the use of multiple LINREG's for the split samples, and also the use of the SWEEP instruction with GROUP for more complicated sample splits.
 
chow2.rpf  This demonstrates a "Chow" tests for sample split at a known location using a single regression with variables dummied out over the interval.
 
chowdenning.src  Computes the multiple variance ratio statistic from Chow, K.V. and Denning, K. (1993) "A simple multiple variance ratio test", Journal of Econometrics, 58, 385401
 
chowlin.src 
ChowLin distributes a series, changing the frequency to a higher one while
maintaining the sum over each period, using the ChowLin(1971) or related procedure.
The newer procedure disaggregate.src is a better
choice.
 
chowtest.rpf  Example of Chow tests in linear model
 
ckls_jof1992.zip 
Replication files for Chan, Karolyi, Longstaff and Sanders(1992),
"A Empirical Comparison of Models of the ShortTerm Interest Rate" Journal of
Finance, vol 47, no 3, 12091227.
 
clarkforetest.src  This procedure calculates Clark and McCracken's MSEt, MSEF, ENCt, and ENCF forecast performance tests. (Clark and McCracken, 2001 and McCracken, 2004). Additional documentation is available in the file CLARKFORETESTDOC.PDF
 
classicaldecomp.src  Does a classical decomposition of a series into trendcycle, seasonal and irregular components. The seasonals are assumed to be constant across the data range.
 
cochran2.src  Procedures for computing various measures of persistence proposed by Cochrane in his 1988 JPE article.
 
cochrane.src  Procedures for computing various measures of persistence proposed by Cochrane(1988), "How Big is the Random Walk in GNP?", JPE, vol 96, 893920.
 
cointpo.src  Computes PhillipsOuliaris multivariate cointegration statistic.
 
cointtst.rpf  Demonstrates several types of tests for cointegration. 1. DickeyFuller (using DFUNIT.SRC) test on a (hypothesized) cointegrating vector. 2. EngleGranger test (using EGTEST.SRC) with an estimated cointegrating vector. 3. Johansen LR test (using JOHMLE.SRC)
 
condition.rpf  Example of conditional forecasting and simulation in a VAR
 
condition.src  Updated version of the conditional forecasting procedure that has been included with RATS for many years (see Section 10.14 of the RATS 6 User's Guide). This version allows more general linear constraints on the values of future endogenous variables.
 
constant.rpf  Demonstrates a variety of tests for parameter constancy in a linear regression. 1. Does a Hansen/Nyblom fluctuations test, using the STABTEST.SRC procedure. 2. Does a Chow predictive test 3. A CUSUM test using the RLS instruction. 4. Sequential Ftests displayed graphically.
 
consumer.rpf  Estimates a consumer demand model using nonlinear systems estimation (NLSYSTEM instruction). Demonstrates the use of named PARMSETS created with NONLIN, "adding" them to impose restrictions on the model's parameters.
 
copula.rpf  Demonstrates use of a copula as an alternative to a multivariate GARCH model
 
corrado.src  Computes the nonparametric test statistic from Corrado (1989), "A NonParametric Test for Abnormal SecurityPrice Performance in Event Studies. Journal of Financial Economics, vol. 23, 385395.
 
corrintegral.src  Computes a correlation integral for a series.
 
crosscorr.src  CrossCorr computes and graphs cross correlations of two series, presenting the information as a 2x2 matrix of graphs, with the autocorrelations of the two series, lag and lead cross correlations in separate graphs. (File was renamed from CROSSCOR.SRC in July, 2005)
 
crosspec.src  Computes and optionally graphs the estimated coherence, phase and gain of a pair of series.
 
cseriessymm.src  Symmetrizes the complex series cs
 
cumpdgm.rpf  Demonstrates use of the CUMPDGM.SRC procedure for the Durbin cumulated periodogram test for white noise.
 
cumpdgm.src  Performs a Durbin's Cumulated Periodogram for serial correlation. Durbin(1969), "Tests for Serial Correlation in Regression Analysis Based on the Periodogram of Least Squares Residuals", Biometrika, 116.
 
cushman_zha_jme1997.zip 
Replication file for Cushman and Zha(1997),
"Identifying monetary policy in a small open economy under flexible exchange rates,"
Journal of Monetary Economics, vol 39, no 3, 433448.
 
cusumtests.src 
Performs CUSUM and CUSUMQ tests of the input series, which should be a
series of recursive residuals.
 
cvmodel.rpf  Demonstrates the use of the CVMODEL instruction for estimating structural VAR's.
 
cvstabtest.src  Performs the special case of the Nyblom test for the case of a complete covariance matrix. Note that while this should have the correct asymptotic distribution under the null (under fairly typical assumptions in addition to stability), the argument for it being UMP against an alternative of martingale behavior won't hold because the covariance matrix is constrained to be positive definite.
 
cxlogdensity.src  This is a generalization of 0gDensity to complex matrices for use in multivariate Whittle likelihood estimation. It computes the frequencybyfrequency log likelihood. Use %CXLogDensityCV for the concentrated Whittle log likelihood.
 
cxlogdensitycv.src  This is a generalization of 0gDensityCV to complex matrices for use in multivariate Whittle likelihood estimation. This computes the concentrated log likelihood. Use %CXLogDensity for the frequencybyfrequency log likelihood.
 
denhaan_jme_2000.zip  Replication of Wouter J. den Haan(2000), "The comovement between output and prices," Journal of Monetary Economics, vol 46, no 1, 330.
 
dennismd2007.zip 
Replication file for Dennis(2007), "Optimal Policy in Rational
Expectations Models: New Solution Algorithms", Macroeconomic Dynamics,
vol 11, 3155.
 
density.src  A procedure for computing the nonparametric density function of a series using a standard normal kernel. Superseded by the introduction of the builtin DENSITY command in RATS Version 5.0, but useful for users with older versions.
 
denton.src  Implements the proportional Denton method of benchmarking, distributing the sum from a low frequency series based upon the periodtoperiod rates of change of a (single) higher frequency series. This is designed to be used when the two series are closely related, with the more frequent series being a noisier measure of the less frequent one. The newer procedure disaggregate.src does the same calculation and more.
 
dfunit.src  Procedure for computing (augmented) DickeyFuller Unit Root tests. Dickey and Fuller(1979), "Distribution of the Estimators for Time Series Regressions with a Unit Root", J.A.S.A., 427431.
 
dieboldyilmaz_ej2009.zip 
Replication files for Diebold and Yilmaz(2009), "Measuring Financial Asset
Return and Volatility Spillovers, with Application to Global Equity Markets,"
Economic Journal, vol. 119, no. 534, 158171.
 
dieboldyilmaz_ijf2012.zip  Replication file for Diebold and Yilmaz(2012), "Better to give than to receive: Predictive directional measurement of volatility spillovers," International Journal of Forecasting, vol. 28, no 1, 5766.
 
digamma.src  Computes DiGamma and TriGamma functions, which are the first and second derivatives of the log gamma function. Builtin functions for computing these (0IGAMMA and %TRIGAMMA) are now available in RATS beginning with version 6.02.
 
disaggregate.src  Does a temporal disaggregation of a series, changing the frequency to a higher one while maintaining the sum, average or final value over each period of the levels. This can handle a variety of models both for the noise term and linear, loglinear and multiplicative relationships. It does the work previously handled by the CHOWLIN, INTERPOL and DISTRIB procedures.
 
distrib.src  DISTRIB computes a distribution of a series, changing the frequency to a higher one while maintaining the sum each original period, e.g. producing a monthly "GNP" estimate from quarterly GNP. The newer procedure DISAGGREGATE.SRC can do the same calculation and quite a bit more.
 
distriblag.rpf 
Demonstrates various techniques for estimating distributed lags.
 
divisia.src  Computes a Divisia index.
 
dlmcycle.rpf  Estimation of a statespace model with a common growth cycle
 
dlmest.prg  Demonstrates estimation of the free parameters in a statespace model using the instruction DLM.
 
dlmexam1.rpf  Example of Kalman smoothing in a simple statespace model.
 
dlmexam2.rpf  Example of Kalman filtering and outofsample forecasting in a simple statespace model.
 
dlmexam3.rpf  Example of unconditional simulation in a simple statespace model.
 
dlmexam4.rpf  Example of conditional simulation for a simple statespace model.
 
dlmgls.src  Estimates a linear regression by GLS, where the error process is described by a state space model, like those used by the RATS instruction DLM.
 
dlmirf.src  Computes and graphs impulse responses and error decompositions for the states in a state space model. The transition equation takes the form Y(t)=AY(t1)+Fw(t) where F is an nxp matrix, where p is the number of fundamental shocks. The covariance matrix of w is assumed to be the identity.
 
dlmirfexample.rpf  Example of the use of the @DLMIRF procedure for doing impulse responses in a statespace model.
 
dmariano.src 
Computes DieboldMariano Forecast Comparison test, or, optionally, the Modified DieboldMariano test.
 
dols.src  Implements Stock and Watson's Dynamic OLS estimation of Cointegrating Vectors. We recommend that you download DOLS.ZIP a PKZip archive which includes the procedure, a readme file, an example program and two datafiles. If you just want the procedure file, download DOLS.SRC.
 
dra_joe_2006.zip  Replication file for Diebold, Rudebusch & Aruoba (2006), "The macroeconomy and the yield curve: a dynamic latent factor approach," Journal of Econometrics, vol. 131(12), pages 309338.
 
dsgecontrol.src  Procedure for doing optimal control on a linear rational expectations model. Algorithm from Dennis(2007), "Optimal Policy in Rational Expectations Models: New Solution Algorithms", Macroeconomic Dynamics, vol 11, 3155.
 
dsgehistory.rpf  Example of computation of the historical decomposition for a DSGE model.
 
dsgekpr.rpf 
Example of solution of a nonlinear DSGE model
 
dsgetool.src  Computes the solution to a linear rational expectations model input in the canonical form given in Sims, "Solving Linear Rational Expectations Models", Computational Economics, October, 2002.
 
dueker_jbes1997.zip 
Replication file for Dueker(1997),
"Markov Switching in GARCH Processes and MeanReverting StockMarket Volatility,"
J of Business & Economic Statistics, vol. 15, no 1, 2634.
 
dueker_jbes2005.zip 
A rough implementation of Dueker (2005),
"Dynamic Forecasts of Qualitative Variables: A Qual VAR Model of U.S. Recessions",
JBES, vol 23, no 1, 96104, which estimates a VAR with a "probit" equation using Gibbs sampling.
 
durbinlevinson.src  Uses the DurbinLevinson recursion to estimate the coefficients in a sequence of autoregressive representations for a stationary series.
 
eba.src  Performs the calculations from Granger and Uhlig(1990), "Reasonable Extreme Bounds Analysis", J. of Econometrics, vol. 44, 159170.
 
ect.rpf  Demonstrates estimation of a vector error correction model. This uses the JOHMLE procedure to estimate the cointegrating vector, then imposes the error correction form using the ECT instruction.
 
egarchbootstrap.rpf  Example of bootstrapping an EGARCH model (for forecasting variance outofsample)
 
egarchsimulate.rpf  Example of simulation of an EGARCH model (for forecasting variance outofsample)
 
egcrtval.src  Computes 'exact' critical values for the DickeyFuller and the EngleGranger cointegration tests from the response surface regression in MacKinnon (1991).
 
egtest.src  Computes an EngleGranger test for cointegration. The (approximate) critical values for ttest form are from MacKinnon, "Critical Values for Cointegration Tests", LongRun Economic Relationships, R.F. Engle and C.W.J. Granger, eds, London, Oxford, 1991, pp 267276. Use the related procedure EGTESTRESIDS if you already have the residuals.
 
egtestresids.src  Computes an EngleGranger test for cointegration using the residuals from a previous firststage regression, producing MacKinnon critical values. Use the related procedure EGTEST instead if you need to do the first stage regression as well.
 
ehljme2000.rpf  Model specification for Erceg, Henderson & Levin(2000), "Optimal monetary policy with staggered wage and price contracts," Journal of Monetary Economics, vol. 46, no 2, 281313.
 
ehrmann_ellison_valla_el2003.zip 
Replicates results from Ehrmann, Ellison, Valla (2003),
"Regimedependent impulse response functions in a Markovswitching vector autoregression model",
Economics Letters, Vol. 78, pp. 295299.
 
elderserletis_jmcb2010.zip  Replication file for Elder and Serletis(2010), "Oil Price Uncertainty", Journal of Money, Credit and Banking, Vol. 42, No. 6, 11371159.
 
elfcalc.src  Computes the empirical likelihood for a set of moment conditions.
 
emexample.rpf 
 
enders_siklos_jbes2001.zip  Replication file for Enders and Siklos(2001), "Cointegration and Threshold Adjustment," JBES, vol. 19, no. 2, 16676.
 
endersgranger.src 
Procedure for the threshold unit root tests in
 
endersgrangerjbes1998.zip  Replicates Enders and Granger(1998), "UnitRoot Tests and Asymmetric Adjustment with an Example Using the Term Structure of Interest Rates", JBES, vol 16, 30411. The technical details of the program are described on pages 128  132 of Enders' "RATS Progamming Manual".
 
enderssiklos.src 
Does various types of the unit root regressions with threshold breaks
on the residuals from an EngleGranger cointegrating regression.
 
eqntoacf.src  Creates from the ARMA model given by an equation the theoretical autocovariance function
 
erstest.src  This implements the DFGLS, PT, DFGLSu and QT tests for unit roots due to Elliott, Rothenberg and Stock(1996), "Efficient Tests for an Autoregressive Unit Root", Econometrica, vol 64, no. 4, 813836 and Elliott(1999), "Efficient Tests for a Unit Root When the Initial Observation is Drawn from its Unconditional Distribution", International Economic Review, vol 40, 767783.
 
exactinverse.src 
Computes the exact (limit) inverse of A + kB as k>infinity, for
p.s.d. symmetric matrices A and B. This is a matrix of the form C +
k^1 D.
 
ExampleOne.rpf  Introductory example #1 (display instruction)
 
ExampleTwo.rpf  Introductory example #2 (data handling
 
ExampleThree.rpf  Introductory example #3 (linear regression)
 
ExampleFour.rpf  Introductory example #4 (basic forecasting)
 
ExampleFive.rpf  Introductory example #5 (linear regression with hypothesis tests).
 
ExampleSix.rpf  Introductory example #6 (nonlinear least squares)
 
expsmooth1.rpf  Demonstrates forecasting using exponential smoothing with nonseasonal data. Uses the instruction ESMOOTH.
 
expsmooth2.rpf  Demonstrates forecasting using exponential smoothing with seasonal data. Uses the instruction ESMOOTH.
 
fabianimestre_ee_2004.zip 
Replication for Fabiani & Mestre(2004), "A system approach for
measuring the euro area NAIRU," Empirical Economics, vol. 29, no. 2,
pages 311341.
 
faust_carnegie1998.zip 
Replication of Faust(1998),
"The Robustness of Identified VAR Conclusions About Money",
CarnegieRochester Conference Series on Public Policy, vol 49, 207244.
 
faustleeper_jbes1997.zip 
Replication file for Faust and Leeper(1997), "When Do LongRun Identifying
Restrictions Give Reliable Results", JBES, vol 15, no 3, pp 345353.
 
fif.src  Fractional Integration Filter procedure. This is now (v 6.10) available in RATS with the RATS DIFF instruction.
 
filardojbes1994.zip 
Example provided by Kim and Nelson of a Markov Switching model with timevarying transition probabilities (TVTP).
 
flux.src  Computes the Nyblom fluctuations test on a set of series of scores. Computes both individual and joint test statistics. Nyblom(1989), "Testing for Constancy of Parameters Over Time", JASA, vol 84, 223230.
 
fm.src 
Estimates a cointegrating relation among the listed variables using
fully modified least squares. Minor update in April, 2007 to fix issue
with range used on final regression.
 
fmols.src  Fully modified estimation of cointegrating regressions.
 
forcedfactor.src  Computes a factorization of a covariance matrix which includes (scales of) specified columns in the factorization, or, optionally, a scale of specified rows in the inverse of the factorization. This allows you to either force an orthogonalized component to hit the variables in a specific pattern (done by setting a column of the factorization), or to force that an orthogonalized component be formed from a particular linear combination of innovations (forces a row in the inverse).
 
fract.src  Computes a wider range of fractiles than the standard STATISTICS(fract) command in RATS.
 
fractint.rpf  Demonstrates estimation of a fractionally differenced ARMA model (ARFIMA) using the Whittle likelihood.
 
freqdeseason.rpf  Demonstrates frequency domain deseasonalization as described in Sims (reference??)
 
fry_pagan_jel2011.zip 
Example of calculation of FryPagan (2011) median target estimator.
 
gain.src  Computes and optionally graphs the estimated gain and phase of a pair of series.
 
galiaer1999.zip  Replication file for Jordi Gali(1999), "Technology, Employment and the Business Cycle: Do Technology Shocks Explain Aggregate Fluctuations", American Economic Review, vol. 89, pp. 249271.
 
galiqje1992.zip  Replication file for Jordi Gali(1992), "How Well Does the ISLM Model Fit Postwar U.S. Data", QJE, vol 107, no. 2, pp 709738. Demonstrates VAR's with short and long run restrictions, particularly the instruction CVMODEL and the ShortandLong procedure.
 
gammaparms.src  Returns a 2vector with the two parameters for a Gamma distribution with the given mean and standard deviation. Note that the RATS functions 0ggammadensity(x,a,b) and %rangamma(a) use a parameterization in terms of shape and scale, not degrees of freedom and mean. This returns the a and b appropriate for use with those functions.
 
garch.src  A menudriven procedure for estimating univariate ARCH, GARCH, and related models with varying lag lengths. By Norman Morin. Version 6, posted on November 17, 1999, adds support for MA terms in the mean equation, and the procedure code itself is now significantly shorter than before. Download GARCH.SRC (which includes nonnegativity constraints) or GARCHN.SRC (identical, but omits nonnegativity constraints). Note: RATS now has a builtin GARCH instruction for handling most ARCH and GARCH models, so this procedure is largely obsolete.
 
garchbacktest.rpf  Example of rolling estimates for a GARCH model (for doing VaR calculations).
 
garchboot.rpf 
Example of bootstrapping with a univariate GARCH model, for calculating Value At Risk.
 
garchdeco.rpf 
Example of estimation of a multivariate GARCH with DECO estimator.
 
garchfore.src  GARCHFore computes outofsample variance forecasts for a standard univariate GARCH model, estimated using the GARCH instruction.
 
garchflux.rpf  Example of use of fluctuation test for GARCH model
 
garchgirf.rpf  Example of variance GIRF from multivariate GARCH model.
 
garchgibbs.rpf 
Analysis of a univariate GARCH model using random walk MetropolisHastings.
 
garchimport.rpf 
Example of Monte Carlo integration on a GARCH model using importance sampling.
 
garchmv.rpf  Multivariate GARCH examples. This program was originally written by Rob Trevor and discussed in May, 1994 issue of the RATSletter. It has since been updated by Estima to demonstrate newer aspects of the RATS code, and to include Engle's Dynamic Conditional Correlation (DCC) model. Note: RATS now has a builtin GARCH instruction for handling most ARCH and GARCH models, so the examples in this file are generally obsolete.
 
garchmvbootstrap.rpf  Example of bootstrapping for MV GARCH models. This estimates quantiles on bootstrapped 10day returns using two different MV GARCH models.
 
garchmvdcc2.rpf 
Demonstrates multivariate GARCH with twostep DCC estimator.
 
garchmvdccgibbs.rpf  Example of Gibbs sampling (using Independence Chain Metropolis) with DCC model
 
garchmvmax.rpf 
 
garchmvsimulate.rpf  Example of simulation of a multivariate (DVECH) GARCH process
 
garchm_uv_dummy.rpf 
An example of univariate GARCHM with dummy shift in the "M" effect and variance.
 
garchn.src  Same as GARCH.SRC, but without nonnegativity constraints.
 
garchsemiparam.rpf  Estimation of univariate GARCH model with semiparametric handling of the density of the error process. Partially described in RATS Version 8 User's Guide, section 13.1
 
garchuv.rpf  Univariate GARCH examples. This program was originally written by Rob Trevor and discussed in May, 1994 issue of the RATSletter. Note: RATS now has a builtin GARCH instruction for handling most ARCH and GARCH models, so the examples in this file are generally obsolete.
 
garchuvmax.rpf  Examples of estimates of univariate GARCH models using MAXIMIZE.
 
garchvirfdiag.rpf  Example of computing the Volatility Impulse Response (VIRF) for a GARCH model which doesn't have a "VECH" form, but only models the variances.
 
gausshermite.src  GaussHermite returns the points at which f(x) needs to be evaluated and the corresponding weights for GaussHermite numerical integration.
 
gcontour.rpf  Demonstrates the GCONTOUR instruction for creating contour graphs.
 
geddraw.src  Generates draws for a generalized error distribution by acceptancerejection method. Revised in April, 2006, to add SHAPE option.
 
gencombos.src  Systematically generates all combinations of k integers from the set {1,...,n}. All this procedure does is to generate them as the vector of integers "pick". If you need to do something more than this, insert the necessary code at the "disp pick" instruction.
 
gibbs.rpf  Demonstrates Gibbs sampling for a linear regression model with a Normalgamma prior. Uses DENSITY instruction to generate estimated density function for parameters.
 
gibbsprobitdynamic.rpf  Demonstrates Gibbs sampling estimation of a dynamic "probit" model, where the latent index follows an AR(1) equation.
 
gibbsvar.rpf  This is an example of the use of Gibbs sampling applied to a VAR with a standard Minnesota prior. Different priors can be handled by changing the way that bprior and hprior (the mean and precision of the prior) are created.
 
gibbsvar.src  Uses Gibbs sampling to compute posterior distributions of the parameters of a VAR, along with forecasts. The model/estimator is the normaldiffuse of Kadiyala and Karlsson (1997), "Numerical Methods for Estimation and Inference in Bayesian VAR Models," Journal of Applied Econometrics, pp 99132
 
giv.rpf  Demonstrates generalized instrumental variables estimation. Uses the NLLS instruction with the INSTRUMENTS and OPTIMAL options.
 
glsdetrend.src 
Local to unity GLS detrending routine. Includes the ERS cases (no constant,
constant, constant and trend) as well as the Perron and Rodriguez cases
(constant and trend with a single break). This just does the detrending, not the
actual unit root test(s).
 
gmautofit.src  Does an automatic fit of a multiplicative seasonal ARMA model to a series following the procedure described in Gomez and Maravall, "Automatic Modeling Methods for Univariate Series", in Peña, Tiao and Tsay, eds., "A Course in Time Series Analysis", New York: Wiley, 2001.
 
gnewbold.src 
Performs the GrangerNewbold forecast comparison test.
 
gonzalesrivera_nd1998.zip  Replication file for GonzálezRivera(1998), "SmoothTransition GARCH Models," Studies in Nonlinear Dynamics & Econometrics, vol. 3, no 2, 120.
 
gonzalograngerjbes1995.zip  Replication of the interest rates example in Gonzalo and Granger(1995), "Estimation of common long memory components in cointegrated systems", JBES, vol 13, pp 2736. Demonstrates the procedure johmle.src and the function %PERP.
 
gph.src  Estimates fractional difference power for series using the frequency domain regression techniques of Geweke and PorterHudak(1983), "The Estimation and Application of Long Memory Time Series Models", J. of Time Series Analysis, pp 221238.
 
grangerbootstrap.rpf 
Bootstrapped pvalues for Granger causality test.
 
graphboxplot.rpf  Demonstrates creating of a boxplot using the GBOX instruction.
 
graphforecast.rpf  Demonstrates graphing forecasts (time series defined over different intervals). Uses the ESMOOTH instruction for forecasts.
 
graphfunction.rpf  Demonstrates use of the SCATTER instruction with STYLE=LINES for graphing a general function.
 
graphhighlow.rpf  Demonstrates "highlowclose" graphs, done using the GRAPH instruction with the option STYLE=VERTICAL.
 
graphlabels.rpf  Demonstrates the various labels on a GRAPH instruction.
 
graphmatrix.src  GraphMatrix graphs a rectangular array of series on separate graphs The user can control the maximum number of graphs which can be placed either horizontally or vertically; if needed, the procedure will create as many pages as necessary in order to display the graphs.
 
graphoverlay.rpf  Demonstrates "overlay" graphs (graphs with separate scales for the left and right axes).
 
grayjfe1996.zip  Replicates work on Markovswitching GARCH models from Gray(1996), "Modeling the conditional distribution of interest rates as a regimeswitching process", J. of Financial Economics, vol 42, pp 2762. Makes extensive use of the functions on markov.src.
 
gregoryhansen_joe1996.zip  Replication of example from Gregory and Hansen(1996), "Residualbased Tests for Cointegration in Models with Regime Shifts", Journal of Econometrics, vol 70, 99126.
 
gregoryhansen.src 
Implements the GregoryHansen cointegration test. The cointegrating
regression is allowed to have a trend or not, and can have either a
break in the intercept only or a break in all coefficients.
 
gridseries.src  Creates a series with an evenly spaced grid based either upon range and number of points, or range and interval width.
 
grier_henry_etal_jae2004.zip 
Replication file for Grier, Henry, Olekalns & Shields(2004),
"The asymmetric effects of uncertainty on inflation and output growth,"
Journal of Applied Econometrics, vol 19, no. 5, 551565.
 
hadri.src 
Implements Hadri tests for unit roots in panel data.
This has stationarity as the null, and rejects if the
detrended or demeaned data are too persistent.
 
hafner_herwartz_jimf2006.zip 
Replication file for Hafner and Herwartz(2006),
"Volatility impulse responses for multivariate GARCH models: An exchange rate illustration",
Journal of International Money and Finance, vol 25, no 5, 719740.
 
halton.src  Generates an nvector of the Halton sequence for the given base (which should be a prime number). Halton sequences are deterministic "lowdiscrepancy" sequences which fill the unit cube relatively uniformly (with a different base for each dimension) allowing numerical integrals to be estimated more accurately for a given number of function evaluations than would be possible with truly random numbers.
 
hamilton_susmel_joe1994.zip 
Replication file for Hamilton and Susmel(1994), "Autoregressive
Conditional Heteroskedasticity and Changes in Regime," Journal of
Econometrics, vol 64, pp 307333.
 
hamilton.rpf  Updated version of the HAMILTON.PRG switching model example discussed in the RATS 5.0 User's Guide. This version includes an EM algorithm written by Andrew Leach that provides better initial conditions, allow the model to converge to a solution when using the entire sample data set.
 
hannan.rpf  Demonstrates Hannan Efficient GLS estimation for a distributed lag.
 
hannanrissanen.src 
Computes estimates for an ARMA model using the HannanRissanen algorithm, which
runs a LS regression on lags of the dependent variable and residuals from a
long preliminary AR.
 
hansen_ier1994.zip  Replication of Bruce Hansen (1994), "Autoregressive Conditional Density Estimation", International Economic Review, vol 35, no. 3, pp 705730. This estimates GARCH models with student t errors with timevarying degrees of freedom, and introduces the skewt density.
 
hansen_jbes_1997.zip 
Replication file for the examples of Hansen, Bruce E.(1997),
"Approximate Asymptotic PValues for Structural Change Tests",
Journal of Business and Economic Statistics, vol 15, no. 1, pp 6067.
 
hansen_joe1999.zip 
Replication file from Bruce Hansen(1999), "Threshold effects in non dynamic panels:
estimation, testing and inference", Journal of Econometrics, vol 93,
pp 345368.
 
hansen_joe2000.zip 
Replication for Hansen(2000),
"Testing for Structural Change in Conditional Models",
Journal of Econometrics, vol. 97, no. 1, pages 93115.
 
hansen.rpf  Demonstrates use of LINREG with INSTRUMENTS for testing overidentifying restrictions.
 
hansenecm1996.zip  Replication program for a SETAR model on GNP from Bruce Hansen(1996), "Inference When a Nuisance Parameter is Not Identified Under the Null Hypothesis", Econometrica, vol 64, no. 2, pp 413430. Demonstrates use of tar.src procedure.
 
hansenseojoe2002.zip  Replication file for Hansen and Seo(2002), "Testing for tworegime threshold cointegration in vector errorcorrection models", Journal of Econometrics, vol 110, pp 293318.
 
harveyruizshephardrestud.zip  Replication file for Harvey, Ruiz and Shephard(1994), "Multivariate Stochastic Variance Models", Review of Economic Studies, vol 61, no. 2, pp 247264. Includes programs for univariate and multivariate models.
 
hasbrouck.rpf  Example of the calculation of decomposition of longrun variance using the techniques from Hasbrouck(1995) "One security, many markets: determining the contribution to price discovery", Journal of Finance, vol 50, no 4, pp 11751199.
 
hausman.rpf  Demonstrates direct calculation of a Hausman specification test statistic for 2SLS vs 3SLS.
 
hegy.src  An implementation of the "HEGY" (Hylleberg, Engle, Granger, and Yoo, 1990) seasonal unit root tests for quarterly time series. Options allow you to specify the number of lags, and choose between models with and without intercept, seasonal dummies, and/or trend. You can also have it test all of these models at once.
 
hetero.rpf  Demonstrates LINREG with the SPREAD option for estimating regression with heteroscedastic errors. Includes examples with both variances being known and being estimated.
 
heterotest.rpf  Demonstrates GoldfeldQuandt, BreuschPagan and Harvey tests for heteroscedasticity.
 
hillgev.src 
Estimates the tail index for a distribution, using Hill's method.
 
hinichtest.src  Performs the Hinich bispectrum test for linearity and Gaussianity. Hinich and Patterson (1989), "Evidence of nonlinearity in the tradebytrade stock market return generating process", in Economic Complexity: Chaos, Sunspots, Bubbles and Nonlinearity, Barnett, Geweke and Shell, eds. Cambridge University Press.
 
histbins.src  A modified version of the older HIST.SRC (see below). This version displays bin ranges and counts.
 
histogram.src  New Histogram procedure, using the DENSITY command introduced in RATS 5.0. This includes one command that requires 5.04 or laterthis command can be removed if you have an older version (see comment line in the file). (Renamed from HISTOGRM.SRC).
 
history.rpf  Demonstrates calculation and graphing of the historical decomposition of the data using a VAR.
 
histscat.src  HISTSCAT generates a histogram plot using SCATTER with the XLABELS option. It can't do bar graphs, but it does provide proper xaxis labeling.
 
hjbounds.src 
HJBounds computes (and optionally graphs) the HansenJagannathan bounds
for a set of returns, as a function of the unobserved mean of a riskfree asset.
 
holtzeakin_n_r_ecm1988.zip 
Example of techniques for estimating a VAR with panel data (with large Nsmall T data set) from
HoltzEakin, Newey and Rosen(1988),
"Estimating Vector Autoregressions with Panel Data,"
Econometrica, vol. 56, no 6, pp 137195.
 
hpfilter.rpf  Demonstrates various ways of computing the HodrickPrescott filter using RATS. The standard HP filter is built into the FILTER instruction (beginning with RATS 6.20), but it can also be analyzed using the instruction DLM.
 
hpfilter.src  Executes a HodrickPrescott Filter (Hodrick, R. & Prescott, E., "PostWar U.S. Business Cycles: An Empirical Investigation", CarnegieMellon working paper, 1980. NOTE: The FILTER instruction in RATS can now compute the HP filter directly.
 
htunit.src 
Implementation of HarrisTzavalis test for unit roots in panel data. This has
a null of a unit root, with asymptotics assuming large N, fixed T.
 
hurst.src  Computes a Hurst exponent. Revised in March, 2007 to use a single dialog box for input, and for improved output.
 
icss.src 
Performs the InclanTiao test for breaks in variance.
 
imhof.src  Imhof Procedure for computing P(u'Au < x) for a quadratic form in Normal(0,1) variables. This can be used for ratios of quadratic forms as well, since P((u'Au/u'Bu) < x)= P(u'(AxB)u < 0). Use the functions %QFORMPDF or %QFORMDPDF with RATS versions 6.00 or later.
 
impactsignflip.src  This procedure is used to correct the signs of columns in a factor of a covariance matrix when the signs themselves may not be identified by the process of computing the factor (such as with short and longrun restrictions).
 
impulses.rpf  Demonstrates calculation and (various ways of) graphing impulse response functions. It also demonstrates with VARIRF.SRC procedure, which can do these types of graphics as well.
 
inclantiao.rpf  Replication file for Inclan and Tiao, "Use of Cumulative Sums of Squares for Retrospective Detection of Changes in Variance", JASA 1994, vol 89, pp 913923. Data are included in the program file.
 
influnem.rpf  Demonstrates looping over graph instructions.
 
instrument.rpf  Demonstrates basic 2SLS estimation, using the instruction LINREG with the INSTRUMENTS option.
 
interpol.src  Interpolates a series, changing the frequency to a higher one while maintaining the last value in each period. The newer procedure DISAGGREGATE.SRC can do the same calculation and quite a bit more.
 
intervention.rpf  Demonstrates intervention analysis using the instruction BOXJENK with the INPUTS option.
 
invchisqrparms.src  Returns a 2vector with the two parameters (degrees of freedom and scale, in that order) for an inverse chisquare distribution with the given mean and standard deviation.
 
invgammaparms.src  Returns a 2vector with the two parameters for an inverse Gamma distribution with the given mean and standard deviation. Note that the RATS functions 0ggammadensity(x,a,b) and %rangamma(a) use a parameterization in terms of shape and scale, not degrees of freedom and mean. This returns the a and b appropriate for use with those functions.
 
ipshin.src  Implements panel unit root tests from Im, Pesaran and Shin(2003), "Testing for Unit Roots in Heterogeneous Panels", J. of Econometrics, vol 115,5374.
 
irelandjedc2004.zip 
Replication program for Ireland(2004), "A Method for Taking Models to
the Data", Journal of Economic Dynamics and Control, vol 28, no. 6,
12051226.
 
irfrestrict.src  Builds up (one constraint at a time) a restriction matrix for a "B" form structural VAR.
 
johmle.src  Computes Johansen lambda tests for cointegrating rank, and the ML estimator for a single cointegrating vector. Updated in February, 2006, October, 2006, and February, 2007, to include additional options and improved output.
 
jprjbes1994.zip 
Replication file for Jacquier, Polson and Rossi(1994), "Bayesian Analysis of Stochastic Volatility Models,"
Journal of Business and Economic Statistics, vol 12, no 4, pp. 37189.
 
kernel.src  KERNEL.SRC computes and graphs a nonparametric estimate of the unconditional density of a single series. Other than the graphics, this can be done with with the RATS instruction DENSITY with any version 5.0 or later.
 
kernreg.src  KERNREG.SRC and LOWESS.SRC are procedures for flexible fits of the form y = f(x). KERNREG does this by kernel regression (weighted sums of y values), while LOWESS uses locally weighted fits of first order polynomials. RATS v5 now includes the NPREG instruction.
 
kfexact.src  KFEXACT.SRC performs the Kalman filtering technique described in "Exact Initial Kalman Filtering and Smoothing for Nonstationary Time Series Models" by Siem Jan Koopman, JASA, December 1997. This is now included in the RATS instruction DLM when you use the EXACT option.
 
kfilter.src  Kalman filtering procedure, using general matrix inputs (updated so that you don't have to declare/dimension the XKK array ahead of time). This procedure has been superseded by the builtin DLM command introduced in RATS 5.0.
 
kilian_restat1998.zip  Replication of Kilian(1998), "SmallSample Confidence Intervals for Impulse Response Functions", Review of Economics and Statistics, vol 80, no 2, 218230.
 
kilianvigfusson_qe2011.zip  Replication file for Kilian & Vigfusson(2011), "Are the responses of the U.S. economy asymmetric in energy price increases and decreases?", Quantitative Economics, vol. 2, no 3, 419453. Bootstrapinbootstrap analysis of a VAR with asymmetries.
 
klein.rpf  Estimates Klein's Model I using 2SLS
 
kolmtest.src  Computes the test statistic for the KolmogorovSmirnov test of goodness of fit and displays the corresponding critical value at different significance levels. Frequently used to test for Normality, can also be used to test for Chisquared, F, and tdistributions.
 
koop_leongonzalezstrahan_er2010.zip 
This is an example of the Gibbs sampling procedure for cointegrated
models described in
Koop, LeónGonzález and Strachan(2010),
"Efficient Posterior Simulation for Cointegrated Models with Priors on the Cointegration Space",
Econometric Reviews, vol. 29, no. 2, 224242.
 
koutmos_jbfa1996.zip  Replication file for the multivariate EGARCH model with mean and asymmetric volatility spillovers from Koutmos(1996), "Modeling the Dynamic Interdependence of Major European Stock Markets", Journal of Business Finance and Accounting, vol 23, 975988.
 
kpss.src 
Does the KPSS stationarity test procedure.
 
kpswaer1991.zip  Replicates results from King, Plosser, Stock and Watson(1991), "Stochastic Trends and Economic Fluctuations", American Economic Review, vol. 81, pp. 819840. Demonstrates the procedures swdols.src, swtrends.src, johmle.src, and forcedfactor.src
 
krolzigmsvar.zip  Replication files for Krolzig's "International Business Cycles: Regime Shifts in the Stochastic Process of Economic Growth", Oxford University Discussion Paper.
 
kscpostdraw.src 
Uses the rejection method to draw from the posterior formed by multiplying
a Normal by a log inverse gamma. This comes up in the analysis of the
stochastic volatility model. This is a refinement of the proposal in:
 
ksmooth.src  KSMOOTH.SRC performs Kalman smoothing, using general matrix inputs. See also the example program KSMOOTH.PRG. Note that this procedure has been superseded by the builtin DLM instruction introduced in RATS 5.0.
 
l1trend.zip 
Example of L1 filtering (to extract a trend).
 
lagpolyroots.src  Produces a table of the inverted roots of the input lag polynomial, showing the modulus and (for complex roots) the period.
 
lagselec.src  Automatically computes various laglength tests for a single series, including AIC, BIC, LjungBox, and more.
 
lanne_lutkepohl_jmcb2008.zip 
Replication file for Lanne and Lutkepohl(2008),
"Identifying Monetary Policy Shocks via Changes in Volatility",
JMCB, vol 40, no 6, 11311149.
 
laubach_williams_restat2003.zip 
Replication file for Laubach and Williams(2003),
"Measuring the Natural Rate of Interest",
Review of Economics and Statistics, vol. 85, no 4, 10631070.
 
lebo_box_ajps2008.zip 
Replication file for Lebo and BoxSteffensmeier(2008),
"Dynamic Conditional Correlations in Political Science",
American Journal of Political Science, vol 53, no 2, 688704.
 
lee_jimf_1994.zip  Replication for T. H. Lee(1994), "Spread and volatility in spot and forward exchange rates," Journal of International Money and Finance, vol. 13, no 3, 375383. This estimates a set of VECMGARCHX models on spot and forward exchanges rates for several countries.
 
levinlin.src  Implements tests from Levin, Lin and Chu(2002), "Unit root tests in panel data: Asymptotic and finitesample properties", Journal of Econometrics, vol 108, no 1, 1–24.
 
liml.src  LIML does limited information maximum likelihood estimation of a linear regression equation. Before using this, you should set the instrument set using INSTRUMENTS.
 
listexample.rpf  Example of the use of the LIST aggregator
 
localdlm.src  Creates the "A", "C" and "F" matrices for a local level or local trend DLM with shocks to the trend rate or level or both.
 
localdlminit.src  Provides rough estimates of the component variances for the irregular and trend rate variances for a local level or local trend model, possibly in the presence of seasonals.
 
localtrend.src  Performs a "local smoothing regression". Used in one of the example programs for the Makridakis, Wheelwright, and Hyndman textbook (see Textbook Examples)
 
logmvskewt.src 
Computes the log density function for a multivariate skewt distribution.
 
lognormalparms.src  Returns a 2vector with the parameters for the underlying Normal to achieve the given mean and standard deviation for a log normal.
 
logskewtdensity.src  Function returning the log of the normalized (to unit variance and zero mean) skewt density from Hansen(1994), "Autoregressive Conditional Density Estimation", International Economic Review, vol 35, no. 3, 705730.
 
lowess.rpf 
Example of nonparametric regression techniques.
 
lowess.src  Does a flexible fit of y=f(x) using the lowess (locally weighted scatterplot smoothing). This is obsolete. Use the RATS instruction NPREG instead.
 
lpunit.src 
Implements the LumsdainePapell unit root test, allowing for two
breaks in the intercept, the trend or both at unknown locations.
 
lsdvc.src 
Computes a least squares dummy variable (i.e. fixed effects) estimator
for a dynamic panel data model with correction for bias.
 
lsunit.src 
Implementation of LeeStrazicich LM unit root tests with one or two structural breaks.
Optionally, it can do more than two breaks.
 
lts.src  LTS.SRC implements the Least Trimmed Squares Regression method. This computes robust linear regressions in the presence of outliers. For details on this technique and the procedure, see LTS Information (HTML file), or download the same info in the file LTS.TXT).
 
lubikschorfheide_jme2007.zip 
Replication for the DSGE model from Lubik, Thomas A. & Schorfheide, Frank(2007),
"Do central banks respond to exchange rate movements? A structural investigation,"
Journal of Monetary Economics, vol 54, no. 4, 10691087.
 
maautolags.src  @MAAutoLags computes an information criterion for various lags of MA processes using the innovations algorithm, finding the "optimal" choice under that criterion and (optionally) producing a table with the values for all lags.
 
mackinnoncv.src  Computes "exact" critical values for the DickeyFuller and the EngleGranger cointegration tests from the response surface regressions in MacKinnon, J. (1991), "Critical Values for Cointegration Tests", LongRun Economic Relationships, R.F. Engle and C.W.J. Granger, eds. London: Oxford University Press. (Renamed from MACKCVAL.SRC).
 
mannwhitney.src 
Performs a MannWhitney(Wilcoxon) nonparametric test for whether the observations
from the vectors X and Y are drawn from the same distribution.
 
mark_sul_obes2003.zip 
Replication for Mark and Sul(2003), "Cointegration Vector Estimation by
Panel DOLS and Longrun Money Demand," Oxford Bulletin of Economics and
Statistics, vol. 65, no. 5, 655680.
 
markov.src  MARKOV.PRG provides examples of Markov switching models using generated data. Based on December 1998 RATSLetter article. This has been superseded by the newer HAMILTON.PRG example in RATS Version 5.0, so these will only be of interest to users still running RATS 4.x, who can refer to the December 1998 newsletter for technical details.
 
matheson_stavrev_el2013.zip 
Based upon Matheson and Stavrev(2013),
"The Great Recession and the inflation puzzle,"
Economics Letters, vol. 120, no 3, pp 468472
with a reconstructed (and extended) data set.
 
matpeek.src  Contains two procedures: MatrixPeek and MatrixPoke. These extract information or put information into a rectangular array at specified locations. Since version 5.10, RATS now includes builtin functions %MATPEEK and %MATPOKE.
 
maximize.rpf 
Example of the use of MAXIMIZE for a stochastic frontier model.
 
mbkernel.src  Version of KERNEL.SRC required by MODES.SRC.
 
mcfevdtable.src  Computes error bands for the forecast error variance decomposition for a VAR using using the information already computed. Note: this assumes that the shocks used are orthogonal and produce a complete factorization of the covariance matrix. It cannot be used with isolated shocks (from, for instance, sign restrictions).
 
mcgraphirf.src  Graphs error bands for impulse response functions using the information already computed by another procedure (such as MCVARDoDraws). This has many options controlling the general layout and content.
 
mcleodli.src  Performs a McLeodLi test for 2nd order dependence. McLeod and Li(1993), "Diagnostic Checking of ARMA Time Series Models Using Squared Residual Autocorrelations", J. of Time Series Analysis, vol 4, pp 269273.
 
mcmcpostproc.src  Post processor for Markov Chain Monte Carlo statistics. Computes means, standard errors, numerical standard errors and CD measures for each component in an input SERIES[VECT] with the generated statistics.
 
mcpriceeurope.rpf  Monte Carlo option pricing using antithetic acceleration.
 
mcprocessirf.src  Generates error bands for impulse response functions using the information already computed by another procedure (such as MCVARDoDraws). This includes the same calculations as is done by MCGraphIRF, but rather than graphing, creates three RECT[SERIES] which can be graphed or put into tables as you need.
 
mcvardodraws.src  Computes impulse response functions for a VAR using Monte Carlo simulation. This assumes the model is an OLS VAR estimated using the ESTIMATE instruction. This uses a Choleski factorization, though it can be modified fairly easily to do any justidentified factorization.
 
meangroup.src  Similar to SWAMY.SRC, but does a simple weighted average of the coefficient vectors.
 
meplot.src  Displays a mean excess plot for a series.
 
mesa.src  Computes and optionally graphs a spectrum using Maximum Entropy Method.
 
mhegy.src  MHEGY.SRC implements the monthly version of the "HEGY" (Hylleberg, Engle, Granger, and Yoo, 1990) seasonal unit root tests (use the HEGY.SRC version above for quarterly series). Note: Requires Norman Morin's LAGSELEC.SRC procedure file.
 
michaelnobaypeeljpe1997.zip  Replication for Michael, Nobay and Peel(1997), "Transactions Costs and Nonlinear Adjustment in Real Exchange Rates: An Empirical Investigation", J. of Political Economy, vol 105, no 4, pp 862879.
 
miscprob.prg 
 
mixed.src  Estimates an equation using the mixed estimation technique. See the RATS User's Guide for full details.
 
mixture.rpf  Example of a mixture model (notMarkovian) demonstrating the different estimation strategies.
 
mixvar.src  MIXVAR computes estimates for a single equation using the mixed estimation procedure used by the RATS command ESTIMATE. It can be helpful when you have a variable you wish to forecast which does not fit into a fullblown VAR, because it has no predictive content for the other variables, or when you have a limited amount of data for one variable, so you need to use fewer coefficients in that equation than in others.
 
mnz_restat_2003.zip  Replication file for Morley, Nelson & Zivot(2003), "Why Are the BeveridgeNelson and UnobservedComponents Decompositions of GDP So Different?," The Review of Economics and Statistics, vol. 85(2), pages 235243.
 
modelcompanion.src  Defines a function "%ModelCompanion(model)" which returns the companion matrix for a model (could be a VAR, but doesn't have to be). Beginning with version 6.35, this function is builtin.
 
modellagmatrix.src 
Function for using %ModelLagMatrix for RATS versions
before 8.1. This returns the NxN matrix of coefficients for the
dependent variables of the <
 
modes.src  MODES.SRC finds the critical windows and the number of modes of a given time series by KERNEL looping from an initially small window up to the largest obtained through selected increments and incremental values. The companion procedure BOOTS.SRC retrieves critical windows stored in a temp file, KERNEL boots the given time series for each of them, and tests for the null of m versus the alternative of m+1 modes by computing the ASL (Achieved Significance Level) statistics. Both require MBKERNEL.SRC, a strippeddown version of the KERNEL.SRC procedure. MBDEMO.PRG and GDPQ.RAT are sample program and data files. Or download MODES.ZIP which contains all of the above files.
 
montearch.rpf  Demonstrates Monte Carlo examination of the critical values of a test; in this case, for a test for ARCH.
 
monteexogvar.rpf  Demonstrates Monte Carlo integration in a VAR with shock to an "exogenous" variable.
 
montenearsvar.rpf  Example of MCMC analysis of a combination of a near VAR for the lag coefficients and a structural VAR for the covariance matrix.
 
montesur.rpf  Demonstrates an efficient method of drawing from the posterior distribution of a nearVAR by means of importance sampling for the covariance matrix.
 
montesvar.rpf 
Monte Carlo (importance sampling) integration for impulse responses in a structural VAR.
 
montesvar_mh.rpf  Monte Carlo integration of a structural VAR using Random Walk Metropolis. (MONTEVAR.RPF is similar, but uses importance sampling).
 
montevar.rpf 
Example of Monte Carlo Integration of Impulse Responses
 
montevar.src  This computes and graphs error bands for impulse response functions for a VAR using Monte Carlo simulation. This assumes the model is a symmetric VAR estimated using the ESTIMATE instruction. This uses a Choleski factorization, though it can be modified fairly easily to do any justidentified factorization.
 
montevecm.rpf  Monte Carlo integration for a Vector Error Correction Model (with fixed cointegrating vector)
 
mountforduhligjae2009.zip 
Replication file for Mountford and Uhlig (2009), "What are the Effects
of Fiscal Policy Shocks?", Journal of Applied Econometrics (to appear).
 
msemsetupstd.src  These functions and procedures are fairly generic calculations for EM estimation in Markov Switching models.
 
msregression.src  Procedure file for Markov Switching univariate linear regressions, with the either the full coefficient vector switching or part of the coefficient vector is switching and part fixed. Use the MSVARSetup procedures for switching autoregressions and VAR's, and MSSysRegression for other types of multivariate regressions.
 
mssetup.src  These are fairly generic Markov Chain/Markov Switching model support functions. This takes the place of the markov.src file.
 
mssysregression.src  Procedure file for Markov switching multivariate linear regressions (same right hand side variables) with either the full coefficient vector switching or part of the coefficient vector is switching and part fixed. Use the MSVARSetup procedures for switching autoregressions and VAR's where only the mean (and possibly the variance) changes.
 
msvariances.rpf 
Model of Markovswitching variances.
 
msvarsetup.src  Procedure file for setting up Markov switching VAR's.
 
multiplebreaks.src 
This does multiple structural change analysis as described in
Bai and Perron, but using a threshold variable other than time.
 
mvarchtest.src  Performs a multivariate LM test for ARCH effects in a set of series by regressing the crossproducts of the series (that is u(i,t) x u(j,t) for all combinations of i and j) on a constant and its lag(s) and testing the coefficients on the lags.
 
mvbndecomp.src 
Computes a multivariate BeveridgeNelson decomposition of a set of
series via a vector autoregression.
 
mvgarchfore.src  Forecasts a multivariate GARCH model, estimated using the GARCH instruction. Minor revisions/corrections in May 2006.
 
mvgarchtovech.src  Extracts a VECH representation out of the most recent GARCH instruction for use in forecasting or impulse response analysis.
 
mvgarchvarfore.src  @MVGARCHVarFore computes outofsample variance forecasts for several types of GARCH models which don't have a full VECH representation. As a result, they forecast only the variances (producing zeros for the offdiagonals).
 
mvgarchvarmats.src  This pulls the matrices for a variance recursion out of the output from a GARCH model. Do this immediately after the GARCH instruction and repeat the VARIANCES option.
 
mvident.src 
Creates a TiaoBox cross correlation matrix with +, and . symbols for
significant positive, negative and insignificant cross correlations
respectively.
 
mvjb.src  Computes a multivariate version of the JarqueBera test for normality. Note that there are more sophisticated versions of this (for instance, Doornik and Hansen, "An Omnibus Test for Univariate and Multivariate Normality"). This just transforms the input residual series to uncorrelated components (using an eigenbased factorization if not provided by the user) and sums up the univariate JB statistics from those.
 
mvkfiltr.src  Multivariate Kalman filtering procedure. Superseded by builtin DLM instruction introduced in RATS 5.0.
 
mvqstat.src 
Computes the Hosking variant on the multivariate Q statistic.
 
nbercycles.src 
Generates dummy variables for quarterly or monthly data based upon the NBER
business cycle reference dates.
 
neural.rpf  Estimates and does predictions using a neural network model. Demonstrates the instructions NNLEARN and NNTEST.
 
nlls.rpf  Demonstrates estimation using nonlinear least squares with the instruction NLLS.
 
nndynfore.rpf  Example of dynamic forecasting with neural networks
 
nonlinear.rpf 
Demonstrates several techniques for maximum likelihood estimation of a nonlinear model.
 
normtest.src  Implements a multivariate test for normality, as described by Doornik and Hansen (1994), which was based on a proposal of Shenton and Bowman (1977). It can also perform univariate normality tests. The test is described in a working paper by Jurgen A. Doornik and Henrik Hansen, which is available as a PostScript file at: http://www.nuff.ox.ac.uk/Users/Doornik/.
 
npreg.rpf  Demonstrates nonparametric regression using the NPREG instruction. The application is semiparametric weighted least squares, estimating the schedastic function for weighted least squares using NPREG.
 
observableindex.rpf  Estimates an observable index model from Sargent & Sims(1977), "Business cycle modeling without pretending to have too much a priori economic theory"
 
olshodrick.src  Procedure to compute a least squares regression with the covariance matrix proposed by Hodrick(1992) "Dividend Yields and Expected Stock Returns: Alternative Procedures for Inference and Measurement", Review of Financial Studies, vol 5, no 3, 357386.
 
olsmenu.rpf 
Example of userdefined menus.
 
onebreak.rpf 
Analysis of linear regression with single break in time sequence.
 
ozbekozlale_jedc_2005.zip 
Replication file for Ozbek and Ozlale(2005), "Employing the extended
Kalman filter in measuring the output gap," Journal of Economic
Dynamics and Control, vol. 29, no. 9, pages 16111622.
 
pacf2ar.src  Generates the series of coefficients for an autoregressive representation from an input set of partial autocorrelations.
 
pancoint.src 
Procedure for Cointegration Tests in Heterogeneous Panels with
Multiple Regressors ("Pedroni tests").
 
panel.rpf  Demonstrates various techniques for estimating linear models in panel data. Does fixed effects, random effects, first differenced and SUR using the instruction PANEL. Also shows how to implement create dummy variables and do panel data filtering techniques.
 
panelcause.rpf  Example of panel causality test allowing for heterogeneity in the coefficients and variances.
 
paneldols.src 
PANEDOLS.SRC is procedure for Peter Pedroni's methodology
for group mean panel tests using Dynamic OLS.
 
panelfm.src 
PANELM.SRC is a new version of Peter Pedroni's methodology
for group mean panel tests using Fully Modified OLS.
Now in the form of the procedure, this is much easier to
use than the old example program version (PANGROUP.PRG),
and includes several important revisions by Prof. Pedroni.
 
panelscc.src  This estimates Spatial Correlation Consistent (SCC) covariance matrix from panel data, from Driscoll and Kraay's "ConsistentCovariance Matrix Estimation With Spatially Dependent Panel Data", Review of Economics and Statistics article, November, 1998. It computes coefficient estimates and standard errors consistent for spatial correlation, autocorrelation and heteroskedasticity for linear instrumentalvariable panel data. Also available are an example program using purchasingpower parity model (PPP01.PRG) and the accompanying data set (PPP.RAT).
 
panelthresh.src 
Tests a fixed effects regression for one or two breaks in a single
regressor, with breaks determined by the values of another variable.
 
panelcause.rpf  Example of panel causality test allowing for heterogeneity in the coefficients and variances.
 
pdl.rpf  Demonstrates estimation of polynomial distributed lags using the instructions ENCODE and LINREG with UNRAVEL. See also PDLREG.SRC.
 
pdl.src  Automates the process of estimating Polynomial Distributed Lag models you list the variables, start and end lags, polynomial degree, select a constraint type, and the procedure does the rest.
 
pdlreg.src  Computes a Polynomial Distributed Lag. This is an update of the older PDL.SRC procedure included with RATS for many years. It offers more options, and the input conforms more closely to the standard form used by builtin RATS instructions.
 
pdlselec.src  Helps select a PDL model by computing AIC and BIC criteria. Note: this requires an older version of the PDL procedure (also originally by Norman Morin), which is available in the file PDLMORIN.SRC procedure.
 
pedroni_jae2007.zip  Replication of Pedroni(2007), "Social capital, barriers to production and capital shares: implications for the importance of parameter heterogeneity from a nonstationary panel approach", Journal of Applied Econometrics, vol 22, no 2, 429451. Uses the PANCOINT and PANELFM and procedures for testing and estimation of cointegration models in heterogeneous panels.
 
pedronirestat2001.zip  Replication file for Pedroni(2001) "Purchasing Power Parity Tests in Cointegrated Panels", Review of Economics and Statistics, 83, 727731. Demonstrates the procedures panelfm.src and paneldols.src.
 
perron.src  Performs the Perron test for a unit root allowing for a onetime change in the slope or level of the series. Useful when standard tests against trend stationary alternatives cannot reject the null hypothesis of unit root if the true data generating process is that of stationary around a trend function which contains a one time break. By Diego Vasquez, based in part on Norman Morin's URADF.SRC procedure.
 
perron97.src  Implements various unit root tests for series with endogenous time breaks, as described in Perron's paper "Further evidence on breaking trend functions in macroeconomic variables, Journal of Econometrics 80, 1997.
 
perronbreaks.src  Implementation of the general structure for analyzing breaks with unit roots in Perron(2006), "Dealing with Structural Breaks," in Palgrave Handbook of Econometrics, Vol. 1, pp 278352, extended to allow more than one break.
 
perronngmtests.src 
Computes one or more of the PerronNg "M" unit root tests.
 
perronrodriguez.src 
Does the PerronRodriguez(2003) test for unit roots using GLS
detrending, allowing for a break point at an unknown date.
 
perronwada_jme_2009.zip  Replication file for Perron and Wada(2009), "Let’s take a break: Trends and cycles in US real GDP", Journal of Monetary Economics, vol 56, 749765.
 
persist.src  Uses frequency domain techniques to estimate the sum of the coefficients of the moving average representation for a series (persistence measure).
 
pesaranshinsmithjasa.zip  Replication file for Pesaran, Shin and Smith(1999), "Pooled Mean Group Estimation of Dynamic Heterogeneous Panels", JASA, vol. 94, no. 446, pp. 621634. Demonstrates the instruction SWEEP.
 
phillipshannan.src 
Uses a multivariate Hannan's Efficient Estimator to estimate a set of linear equations with stationary errors
and tests linear restrictions on the parameter matrix.
 
polymult.src  Takes as input two vectors of coefficients from two lag polynomials (or two general polynomials) and multiplies them out to get a vector of coefficients for their product. The second polynomial can include seasonal terms. The RATS function %POLYMULT has largely made this obsolete.
 
portfolio.rpf  Demonstrates tracing the meanvariance efficient frontier for a portfolio given mean and covariance matrix. This uses the instruction LQPROG for quadratic programming and SCATTER for drawing a general function.
 
potest.src 
Computes a PhillipsOuliaris(Hansen) test for cointegration. This includes the first stage regression.
Use the related procedure @POTESTRESIDS if you already have the residuals.
 
potestresids.src 
Computes a PhillipsOuliaris(Hansen) test for cointegration using the residuals from an (already completed) regression. Use the
related procedure @POTEST if you need to do the first stage regression as well.
 
ppunit.src 
Computes one of the PhillipsPerron modifications to the DickeyFuller unit root tests.
 
princomp.src  A simple procedure for extracting principal components. Updated in Feb. 2006, with options for analyzing data in correlation or centered form.
 
prinfactors.src  PRINFACTORS does a principal components based factor analysis of an input covariance or correlation matrix.
 
prjconditional.src  Computes predicted probabilities for a conditional logit. This should be only be used after doing DDV with TYPE=CONDITIONAL.
 
prjmultinomial.src  Computes predicted probabilities and marginal effects for choices in a multinomial logit. This should be only be used after doing DDV with TYPE=MULTINOMIAL.
 
prjpoisson.src  Computes prediction and marginal effects for a count data model using the Poisson. This should be only be used after doing DDV with TYPE=COUNT.
 
probit.rpf  Demonstrates logit and probit estimation for a binary choice model. Uses the instruction DDV.
 
psdinitcx.src  Contains the userdefined function %PSDINITCX, which implements the calculation of a ergodic variance of a state space model using the diagonalization methods described in Soren Johansen, "A Small Sample Correction for the Test of Cointegrating Rank in the Vector Autoregressive Model", Econometrica, September 2002. This is more efficient than the direct solution of the linear system used in the RATS function %PSDINIT when there are 6 or more states, with the advantage becoming quite noticeable when there are 15 or more.
 
qplot.src  Creates a Q plot for a series against a hypothesized Normal or Exponential distribution.
 
qprog.rpf  Demonstrates inequality constrained quadratic programming. The application is a linear regression with inequality constraints. Uses the instruction LQPROG.
 
qqplot.prg 
 
quahvaheyej1995.zip  Replication file for Quah and Vahey (1995), "Measuring Core Inflation?", Economic Journal, vol. 105, pp 113044. Demonstrates use of the HISTORY instruction and the 0QFACTOR function.
 
quartimax.src  QuartiMax rotates a set of factor loadings (previously computed) using the quartimax criterion.
 
randomize.rpf  Demonstrates approximate randomization, a form of bootstrapping for testing "unrelatedness". Uses the instruction BOOT.
 
rangrid.src  Defines a FUNCTION called %RANGRID that creates a random draw from distribution approximated across a grid of points.
 
ranmixture.src  This draws a vector from a mixture of Normals.
 
rannormaltrunc.src  Generates a (single) draw from a truncated random Normal distribution. The distribution can be truncated above, below or both.
 
rantruncate.src  Generates draws from a truncated Normal using the rejection method. In versions of RATS 7.3 and later, this is a builtin function.
 
ras.zip  This Zip file contains the RAS procedure for updating rectangular matrices by the RAS method (biproportional adjustment of matrices)useful in InputOuput analysis. The file includes the procedure file, example program and output, and descriptive file.
 
regactfit.src  Regression postprocessor which graphs actual/fitted and residuals in separate vertical zones on the same box.
 
reganova.src  Prints an analysis of variance table for the last linear regression.
 
regarima.rpf  Demonstrates estimation of a RegARIMA model (regression with an ARIMA error process).
 
regconfidence.src  Regression postprocessor to show table of confidence intervals for coefficients
 
regcorrs.src  Computes and graphs autocorrelations, displaying also the Q statistic, AIC and SBC criteria for the residuals from the last regression or ARIMA estimation.
 
regcrits.src  Computes and displays the Akaike Information Criterion, Schwarz Bayesian Criterion, HannanQuinn, and FPE, for use in comparing models.
 
regexactdw.src  Regression postprocessor which computes the exact significance level for the DurbinWatson statistic in an OLS regression.
 
reghbreak.src 
RegHBreak is a regression postprocessor which performs AndrewsQuandt
and AndrewsPloberger tests, estimating the pvalue using fixed
regressor bootstrapping.
Use this after running a linear regression.
 
regpartcorr.src  The procedure REGPARTCORR computes and prints the partial correlations between the regressors and the dependent variable (file renamed from REGPCORR.SRC).
 
regpcse.src 
Computes a PanelCorrected version of an OLS regression on a panel data set.
This should be used after the LINREG which does the OLS estimates. This allows
for one of several forms of covariances between the regressors and disturbances.
 
regrecursive.src  RegRecursive is a regression postprocessing procedure which computes recursive residuals and does testing methods based upon them. The basic regression is y(t)=X(t)b+u(t). The variance of u is assumed to be the (unknown) sigma**2. RegRecursive uses the Kalman filter to produce a series of estimates for the regression. Recursive residuals are the residuals for t using the estimates through t1, normalized to be homoscedastic if the regression model is correct. Virtually all of this (other than graphs) can be done with the builtin RATS instruction RLS.
 
regreset.src 
RegRESET is a regression postprocessor which performs Ramsey's RESET test.
Use this after running a linear regression to test the
specification of that regression.
 
regstabtest.src  Computes Hansen (NyblomHansen) stability test for a (just computed) linear regression. It computes both individual and joint test statistics.
 
regstrtest.src 
Does an LM test for linearity vs an alternative of smooth transition based upon lags of a
known threshold variable in the preceding linear regression. This should be executed
immediately after a LINREG.
 
regtotex.src  Takes the most recent regression and produces a TeX equation showing the regression information in equation form.
 
regtree.src  Performs a CART (Classification and Regression Trees) analysis. This is a nonparametric alternative to regression for analyzing the relationship between a dependent variable and a set of explanatory variables. CART works by splitting off the data into branches based upon the values of the independent variables. At each stage, it takes the branch which has the highest within group sum of squares for the dependent variable, and picks a split point which gives the greatest reduction in that sum. The calculations required to create a CART are simple (nothing more than sums of squares), but tedious, as each value of each explanatory variable is examined at each stage.
 
regwhitenntest.src 
Regression postprocessor to do the White Neural Network test.
 
regwhitetest.src  Regression postprocessing procedure for doing a "White" test for heteroscedasticity. This should be executed immediately after a LINREG.
 
regwutest.src 
RegWuTest performs a Wu (or DurbinWuHausman) specification test on a
regression just estimated by instrumental variables. Because it works off
the last regression, there are no parameters.
 
reprobit.rpf  Example program demonstrating the estimation of a panel data probit model with random effects.
 
reset.src  Performs a Regression Error Specification Test.
 
rgse.src 
Procedure which uses Robinson's Gaussian semiparametric estimator for
estimating the fractional differencing parameter.
 
riskmtrc.src  Implements Riskmetricsstyle time varying correlations and volatilities computations.
 
rlinreg.src  Computes and graphs recursive coefficient estimates along with 1.96 standard error bands around them, to give a sense whether the coefficients seem constant over a sample
 
rls.prg  Demonstrates use of the instruction RLS for doing an arranged autoregression for testing for threshold effects.
 
robust.rpf  Demonstrates robust estimators for linear models. Uses the instruction RREG (for computing LAD estimator), and LINREG with SPREAD for iterated weighted least squares.
 
robustlmtest.src  Performs a heteroscedasticityconsistent LM test for the orthogonality between the residuals from the most recent regression and the input test variables. See, for instance, Wooldridge, "Econometric Analysis of Cross Section and Panel Data", MIT Press, 2002, page 60.
 
robuststar.rpf 
Demonstrates a test for STAR (smooth transition autoregression) with outlier adjustments.
 
rollreg.src  Rolling OLS regressions in one of three modes. Written originally at Bank of Canada; revised in 2010.
 
roots.src  Contains the procedure ComplexRoots which computes the complex roots of an input polynomial. This has been made obsolete by the RATS function %POLYCXROOTS.
 
rrgqtest.src  Performs a GoldfeldQuandt type (sample partition) test for heteroscedasticity, applied to a series (such as recursive residuals) that are already assumed to be independent.
 
rsstatistic.src 
Computes either the classical R/S statistic, or Lo's modified version,
where the scale is the square root of the longrun variance.
 
rollingcausality.rpf  Example of a (bivariate) Granger causality test in a rolling window with simulated data.
 
runtest.src  For a input series x which shows two states (1,0), this computes a run test. The procedure can estimate the probability of success, or you can input this yourself.
 
sadorsky_ee2012.zip  Replication file for Sadorsky(2012), "Correlations and volatility spillovers between oil prices and the stock prices of clean energy and technology companies", Energy Economics, vol 34, pp 248255.
 
sarima.src  This is a menudriven procedure for identifying, estimating, and forecasting ARIMA models. Basically, this combines the functions of the BJIDENT and BJFORE procs included with RATS in a single, easy to use procedure. December 1998 update provides many more options, including support for nonconsecutive lag lists.
 
seasonaldlm.src  Creates the A, C, and SW matrices for the seasonal component of a DLM. See Durbin and Koopman, "Time Series Analysis by State Space Methods", Oxford University Press 2001, pp 4042, and West and Harrison, "Bayesian Forecasting and Dynamic Models" 2nd ed, Springer 1997, chapter 8 for more information.
 
sctest.rpf  Examples of tests for serial correlation.
 
shiller.rpf  Demonstrates estimation of a distributed lag using the Shiller Smoothness prior. Shiller, R.J. (1973). "A Distributed Lag Estimator Derived from Smoothness Priors." Econometrica, Vol. 41, pp. 775788. Uses the instructions CMOMENT and LINREG(CMOMENT) to handle mixed estimation. See also gibbs.prg, which does the same type of prior, but uses Gibbs sampling rather than mixed estimation.
 
shillergibbs.rpf  Example of Gibbs sampling applied to a Shiller Smoothness Prior for a distributed lag.
 
shortandlong.src  Computes a factorization of sigma with a combination of short and long run restrictions. It can only be applied to justidentified parameter izations where the restrictions are zero restrictions. If you have an underidentified parameterization, you can compute the "RPERP" matrix which maps free parameters into the loading matrix, but you have to use NOESTIMATE.
 
shortandlongvecm.rpf 
Example of a VECM with shortandlong run restrictions for structural model.
 
simplerbc.rpf  Example of solving a small DSGE, producing impulse responses
 
simszhaecm1999.zip 
This zip file includes most of the analysis in
 
simuladd.rpf 
Simultaneous equations; add factoring
 
simulest.rpf 
Simultaneous equations; estimation
 
simulfore.rpf 
Simultaneous equations; forecasting
 
simulmult.rpf  * * SIMULMULT.RPF * RATS Version 8, User's Guide, example from Section 8.3. * source prsetup.src smpl 1984:1 1985:4 forecast(model=prsmall,results=base) compute govt(1984:1)=govt(1984:1)+2.0 forecast(model=prsmall,results=mults) compute govt(1984:1)=govt(1984:1)2.0 do i=1,%rows(mults) set mults(i) = (mults(i)base(i))/2.0 labels mults(i) # 'M_'+%modellabel(prsmall,i) end do i print(picture="*.###") / mults
 
simultheil.rpf 
Simultaneous equations; forecast performance analysis
 
sinclairjmcb2009.zip  Replication of Sinclair(2009), "The Relationships between Permanent and Transitory Movements in U.S. Output and the Unemployment Rate," Journal of Money, Credit and Banking, vol. 41(23), pages 529542.
 
skalin_terasvirta_jae1999.zip 
Replication file for
Skalin and Terasvirta(1999),
"Another Look at Swedish Business Cycles, 18611988",
Journal of Applied Econometrics, vol. 14, no 4, pp 35978.
 
specdens.src  Calculates the spectral density matrix at frequency zero, i.e., the longrun covariance matrix, of a set of series using nonparametric methods.
 
specfore.rpf  Demonstrates univariate forecasting using spectral techniques. Uses the SPECFORE.SRC procedure.
 
specfore.src  Computes forecasts using spectral techniques.
 
specth.src  Takes a vector of AR and MA terms and calculates the resulting theoretical spectrum (Note: requires the acfmorin.src procedure). An alternative that does a similar calculation using a RATS equation as input is armaspectrum.src.
 
spectrum.rpf 
Example of calculation of a spectral density.
 
spectrum.src  This computes and graphs the estimated spectrum of a series. This is an updated version of the same procedure included with RATSthe new version adds LOGSCALE and PERIODOGRAM options.
 
spgraph.rpf  Demonstrates generation of a "matrix" of graphs using the instruction SPGRAPH.
 
splom.src  This generates a scatter plot matrix  an NxN matrix of bivariate scatter plots.
 
spunit.src 
Computes various "SchmidtPhillips" tests (TAU) for a unit root.
 
ssmspectrum.src  Returns the estimated multivariate spectrum from a state space model given by the A and SW options. It returns in its argument a series of complex matrices.
 
ssvar.src  Uses Gibbs sampling to generate posterior estimates (including forecasts, if the user chooses) as in Villani, Mattias (2006), "Inference in Vector Autoregressive Models with an Informative Prior on the Steady State," Sveriges Riksbank Research Paper No. 19, forthcoming in the Journal of Applied Econometrics.
 
stabtest.src 
Computes Hansen's stability test statistics (for individual coefficients,
variance and jointly).
 
stampdiags.src  Produces the standard set of diagnostics for a (univariate) state space model used by the STAMP(tm) software. This includes a Q test for serial correlation, Normality test, and GoldfeldQuandt type heteroscedasticity test.
 
startest.src 
This does the test for linearity vs an alternative of LSTAR or ESTAR
(smooth transition autoregression).
 
stepprobit.src  StepProbit does a backwards stepwise reduction of a probit model, dropping variables as long as the smallest tstatistic is less than the threshold in absolute value.
 
stockwat.src 
This procedure is a modification of Stock's procedure to do
StockWatson and DickeyFuller Unit Root and Time Trend tests.
 
structresids.src  Converts standard VAR residuals into structural innovations.
 
sur.rpf  Demonstrate SUR (seemingly unrelated regression) estimation using the instruction SUR.
 
surgat.src  SURGAT (Seasonal Unit Roots Graphical Analysis and Testing device) is a menudriven program to help in the analysis of the seasonal component and the trend of a (quarterly, monthly or annual) time series. This program is originally written by Ignacio D¡azEmparanza with the collaboration of Rosa Cao and Lander Ibarra. Requires SPECTRUM.SRC and LAGSELEC.SRC procedure files.
 
surgibbssetup.src  This is a collection of procedures for setting up a Gibbs sampler for a (linear) SUR, such as a nearVAR. An example and a further explanation are provided in the "Bayesian Econometrics" workbook.
 
sv.rpf  Demonstrates quasimaximum likelihood estimation of a stochastic volatility model using the instruction DLM.
 
svar.src  Procedure for estimating the parameters for a structural VAR. By Giannini, Lanzarotti, and Seghelini, based on Giannini's monograph entitled "Topics in Structural VAR Econometrics". An example program using SVAR.SRC and VMA.SRC, called SVAREXAM.PRG, is also available. This requires the data file ITALY.RAT.
 
swamy.rpf  Demonstrates estimation of a linear model in panel data using Swamy's matrix weighted average. See also swamy.src, which is the same calculation converted into a procedure.
 
swamy.src 
Computes a GLS matrix weighted estimator for a panel data set.
For an example, see swamy.prg. meangroup.src does a similar estimator, but uses
simple weighted average rather than a matrixweighted average.
 
swarch.rpf  Demonstrates estimation of a Markov switching ARCH model. Hamilton and Susmel (1994), "Autoregressive Conditional Heteroskedasticity and Changes in Regime", Journal of Econometrics, vol. 64, pp 30733.
 
swdols.src 
Estimates cointegrating vectors using Stock and Watson's dynamic OLS.
 
switch.src  Estimates by maximumlikelihood the switch point in a GoldfeldQuandt switching regression model.
 
swtrends.src 
StockWatson test for cointegration rank via common trends.
 
tar.src 
Estimates a selfexciting threshold autoregression, and computes asymptotic
pvalues for tests for the threshold effect.
 
tarmodels.rpf 
Example of estimation of a STAR Model.
 
terasvirtajasa1994.zip  Replication programs for Terasvirta(1994), "Specification, Estimation and Evaluation of Smooth Transition Autoregressive Models", JASA, vol 89, pp 208218. Demonstrates the procedures startest.src, yulelags.src, and lagpolyroots.src.
 
threshtest.src  Tests for a break in a linear regression based upon a threshold variable. Bruce E. Hansen, "Inference in TAR models", Studies in Nonlinear Dynamics and Econometrics,(1997).
 
tlookup.src  TLOOKUP.SRC provides a procedure for doing table lookups. Given an Nx2 table containing and index column and a column of corresponding values (such as a table of degrees of freedom and corresponding critical values), the procedure returns the value corresponding to a requested index (it will interpolate the value if necessary).
 
tobit.rpf  Demonstrates estimation of standard tobit and twostep tobit models for dealing with censored or truncated data. Uses the instructions LDV and PRJ with the MILLS option.
 
triples.src 
Implements the "Triples" test for asymmetry.
 
tsayjasa1998.zip 
Replication file for Tsay (1998), "Testing and Modeling Multivariate
Threshold Models", J. of American Statistical Assn, vol. 93, no. 443,
11881202.
 
tsaynltest.src 
TsayNLTest does the Tsay OriF test for neglected nonlinearities in an
autoregression. Optionally, it can do the LST variant (which tests more
specifically against STAR).
 
tsaytest.src 
Does a Tsay arranged regression test for the presence of threshold autoregression
(TAR). Demonstrates the instruction KALMAN with the ADD option to add observations
to a regression out of time sequence.
 
tsecctest.src 
Does the Tse LM test for constant correlation. This must follow estimation of a
constant correlation model.
 
tsejoe2000.zip  This contains an example program and data file for implementing Tse's LM test for constant correlation in a multivariate GARCH model. The program replicates the results from the article: Tse, Y.K.(2000), "A Test for Constant Correlations in a Multivariate GARCH Model", Journal of Econometrics, 98, pp. 107127.
 
tvarset.src  TVARSET sets up a timevarying parameters VAR system for estimation using the Kalman filter. As written, it is based upon the simple symmetric Bayesian VAR prior, with the timevariation proportional to the initial covariance matrix.
 
tvarying.rpf  Demonstrates timevarying coefficients estimation of a VAR with search over space of hyperparameters.
 
uforeerrors.src  Computes error statistics on a series of insample onestep forecasts.
 
uhligfuncs.src  This is a pair of functions for simplifying the specification of signconstrained impulse response functions. One is to implement the rejection method; the other calculates the penalty function, as described in Uhlig(2005), "What are the effects of monetary policy on output? Results from an agnostic identification procedure", Journal of Monetary Economics, 52, pp 381419. You should look at the replication files for that paper to see how these are used.
 
uhligjme2005.zip  Three programs replicating VAR identification of impulse responses with sign restrictions from Uhlig(2005), "What are the effects of monetary policy on output? Results from an agnostic identification procedure", Journal of Monetary Economics, vol 52, pp. 381419.
 
uniformparms.src  Returns a 2vector with the two parameters (lower and upper bounds) for a uniform distribution with the given mean and standard deviation.
 
union.rpf  Demonstrates various techniques for analyzing predicted probabilities in a probit model. Makes use of the instruction PRJ for calculating the predictions and SCATTER for graphing the effects.
 
uniquevalues.src  Returns a vector of sorted unique values for a series.
 
unitroot.rpf  Examples of unit root testing, demonstrating DickeyFuller, PhillipsPerron, SchmidtPhillips and ERS and KPSS tests.
 
unitroot.src  One of several variations on DickeyFuller and Phillips Perron unit root tests witten by Francisco Goerlich.
 
unitrootbreak.rpf  Example of unit root tests with breaks
 
uradf.src  For basic ADF (Augmented DickeyFuller) tests, we recommend Norman Morin's URADF.SRC procedure. This performs Augmented DickeyFuller unit root tests, and includes AIC and BIC searches for appropriate lag length and more .
 
urauto.src  One of several variations on DickeyFuller and Phillips Perron unit root tests witten by Francisco Goerlich.
 
ursb.src 
Performs the SarganBhargava unit root test.
 
urtt.src  One of several variations on DickeyFuller and Phillips Perron unit root tests witten by Francisco Goerlich.
 
urttopp.src  One of several variations on DickeyFuller and Phillips Perron unit root tests witten by Francisco Goerlich.
 
var.src  VAR.SRC is a sophisticated, menudriven procedure for selecting, estimating, and evaluating VAR models. Written by Norman Morin. This procedure makes it easy to graph autocorrelations of your data, test for lag length, do Wald tests on coefficient restrictions and on the Variance/Covariance matrix, test residuals for serial correlation, ARCH, normality (including JarqueBera), compute the sum of the Vector Moving Average coefficients, display the VMA representation coefficients, do impulse response analysis using a variety of decompositions, compute forecast error variance decomposition, and compute bootstrapped standard errors for impulse responses. Includes support for the Blanchard + Quah decomposition for IRFs. If you are using RATS Version 4.20 or later, download VAR.SRC. If you are using 4.00 through 4.10, download VAR400.SRC. VAR400 offers most of the same features as VAR, but with a less userfriendly interface due to lack of USERMENU instructions, etc. Also, please note that the 4.0 versions are not being updated, and thus do not include BlanchardQuah and other recent additions.
 
varbootsetup.src  This is a pair of procedures for setting up and realizing bootstrap replications for a VAR.
 
varcalc.src  VARCalc does a direct calculation of a VAR.
 
varcause.rpf  Demonstrates block causality (exogeneity) tests in a VAR. Uses the instruction RATIO.
 
varfpe.src  Computes minimum FPE representation for the equations in a VAR.
 
varfromdlm.src  Generates a VAR representation for a selection of variables from a stationary DLM (statespace model).
 
vargarchsimulate.rpf  Example of simulation of a VARGARCH process. Includes calculation of error statistics on forecasts of the mean (for illustration; it's not a good idea in the presence of GARCH errors).
 
varimax.src  VARIMAX rotates a set of factor loadings (previously computed) using the varimax criterion.
 
varirf.src  This organizes the graphs of an impulse response function from an already estimated VAR.
 
varirfdelta.src  Computes the covariance matrix of the IRF to a fixed shock using the delta method.
 
varlag.rpf  Demonstrates several methods for choosing lag length in a VAR. Among them are LR tests on blocks of lags, generaltospecific lag length testing, and Akaike and Schwarz information criteria. Demonstrates the RATIO instruction and the VARLagSelect procedure.
 
varlagmd.src  Contains the procedure VARLagModel, which computes the NxN matrix of sums of the lag coefficients in the (IA(L))y(t)=u(t) representation of a VAR model. This is the same matrix which ESTIMATE generates as %VARLAGSUMS, but can be used when the coefficients have been reset as part of a Monte Carlo procedure.
 
varlagselect.src  VARLagSelect chooses the lag length which minimizes one of the information criteria.
 
varmadlm.src  VARMADLM.SRC includes two setup routines for estimating or analyzing a vector ARMA model using the RATS instruction DLM.
 
varmagarch.rpf  Example of multivariate VAR and VARMA (mean model) GARCH models
 
varspectrum.src  Returns the estimated multivariate spectrum from a VAR given by the the combination of model and sigma. It returns in its third argument a series of complex matrices.
 
varstability.rpf  Example of a Nyblom fluctuations test applied to a VAR
 
vecmcause.rpf  Example of testing for causality and longrun causality in a VECM
 
vecmgarch.rpf  Example of some of the calculations done in Pardo and Torro(2007), "Trading with asymmetric volatility spillovers", JBFA, vol. 34(910), 15481568, applied to a different data set.
 
vma.src  Procedure for computing impulse response functions and forecast error variance decomposition for structural VAR's (requires SVAR.SRC procedure described above). By Giannini, Lanzarotti, and Seghelini. An example program using SVAR.SRC and VMA.SRC, called SVAREXAM.PRG, is also available. This requires the data file ITALY.RAT.
 
vratio.src  Implements the variance ratio unit root test procedure as outlined in Cochrane (1988), Diebold (1989), and Lo and McKinley (1988). Revised and updated by Estima. (Updated May, 2006: documented DIFF option, corrected problem with NODIFF).
 
watsonaer1994.zip 
Examples of use of the BryBoschan business cycle dating algorithm.
 
watsonjpe1993.zip  This zip file contains an example program and the required data and procedure files to reproduce most of the analysis from Watson(1993), "Measures of Fit for Calibrated Models", Journal of Political Economy, vol 101, pp 10111041. In addition to demonstrating Watson's measures of fit, it also demonstrates methods for solving DSGE models. Watson uses the popular King, Plosser, and Rebelo model. This demonstrates the procedures ssmspectrum.src, varspectrum.src, and the instruction DSGE (or dsgetool.src for version 6.xx).
 
westchotest.src  Computes the modified LjungBox test, robust to heteroscedasticity, proposed in West and Cho(1995), "The predictive ability of several models of exchange rate volatility," Journal of Econometrics, vol. 69, no 2, 367391.
 
west_cho_joe1995.zip  Replication file for West and Cho(1995), "The predictive ability of several models of exchange rate volatility," Journal of Econometrics, vol. 69, no 2, 367391.
 
wfractil.src  Contains the procedure "WFRACTILES", which computes fractiles of a set of sample values with weights. This has been made obsolete by the RATS function %WFRACTILES
 
white.src  Implements White's 1980 test for heteroscedasticity.
 
whittletest.src  Implements the Whittle test for independence of state sequences.
 
willingertaqteverfs1999.zip  Replication file for Willinger, Taqqu and Teverovsky(1999), "Stock Market Prices and LongRange Dependence", Finance and Stochastics, vol 3 pp 113. Uses the procedures hurst.src and rsstatistic.src
 
wrightjbes2000.zip  This replicates the results in Wright(2000), "Alternative VarianceRatio Tests Using Ranks and Signs", JBES, vol 18, pp 19. It demonstrates the procedure vratio.src.
 
wutest.src  WuTest performs a Wu specification test on a regression just estimated by instrumental variables. Because it works off the last regression, there are no parameters.
 
wzsampler.rpf  This uses the WaggonerZha(2003) sampler, "A Gibbs sampler for structural vector autoregressions," Journal of Economic Dynamics and Control, 28(2), 349–366 to analyze a structural VAR.
 
yulelags.src  YuleLags computes an information criterion for various lags of AR processes using the YuleWalker estimates based upon the sample covariances. Use the newer ARAutoLags procedure instead.
 
yulevar.src  This estimates a VAR on stationary data using the YuleWalker equations.
 
zivot.src 
Zivot and Andrews unit root test. Allows for a single break in the intercept,
the trend or both.
