Navigation: <Root level>






Many of the capabilities of RATS are made available through the use of procedures. Procedures are text files of RATS instructions which function much like a built-in instruction, but with greater flexibility. Consider, for instance, a Dickey-Fuller test. This is just a simple linear regression with a specific set of variables. A augmented Dickey-Fuller test with lags chosen by some means requires a set of linear regressions. There is no great advantage to having this "hard-coded" into a RATS instruction (like LINREG itself) since the calculation is quite straightforward. The advantage of providing the D-F test through a procedure is that it's easy to modify either by you, or by us.

RATS ships with over 300 procedures, with more created all the time. Because procedures are so important to the use of RATS, it's important for the program to be able to find the most current versions. RATS maintains a set of search directories. This is generally set up properly when you first install the program, but you can change the directory, or add additional ones for your own procedures.


If you execute a procedure with (say)


@dfunit lgdp


RATS will automatically search for a file whose name matches that of the procedure, with a .SRC extension, so in this case dfunit.src. The search path(s) are set in the program's preferences in the Procedures Directories field on the Directories tab. If you have more than one directory listed, it will start with the first, then, if it's not found, move to the next. By putting your own directory above the standard one, you can use an altered copy before the distribution one.


The most important of the procedures are listed in this section alphabetically. For other procedures (or even for the ones shown here), you can open the .SRC file and read the comments to see how they work.



Generates Arellano-Bond set of instruments


Performs autocorrelation analysis on a series


Computes autocorrelations from partial autocorrelations


Selects optimal lag length to be used for an ADF test


Anderson-Darling test for normality


Andrews-Guggenberger estimate of fractional difference


Andrews-Ploberger Structural Break Test


Andrews-Ploberger Structural Break Test for GARCH/Maximum Likelihood


Computes Information Criteria for AR models using Yule-Walker or Burg


Tests a series for ARCH effects


Sets up a DLM based upon an ARMA model


Graphs the spectral density for an input ARMA model


Estimates factors in a factor model using Bai-Ng formulas


Bai-Perron Test for Multiple Structural Changes


Bayesian Unit Root test


Battery of independence tests


Brock-Decher-Scheinkman test for i.i.d.


Computes parameters required for beta distribution


Hinich bi-correlations test for autocorrelation


Automated ARIMA model selection


Aids in selection of differencing operations


Estimates an ARIMA model


Estimates and forecasts an ARIMA model


Box-Jenkins identification tool


Computes Theil U statistics for an ARIMA model


Aids in selection of preliminary transformation


Band pass filter using Baxter-King method


Beveridge-Nelson decomposition


Does Breusch-Pagan (and related) tests for random effects


Does Monte Carlo draws from a VAR with BQ factorization


Breitung test for unit roots in panel data


Bry-Boschan business cycle dating (Pagan-Harding for quarterly data)


Black-Scholes option pricing procedure


Builds up a prior for a linear equation one element at a time.


Builds up a prior for a Bayesian VAR


Computes canonical correlations for two sets of series


Identifying turning points and cyclical phases of a series


Band pass filter using Christiano-Fitzgerald method


Chow-Denning multiple variance ratio test


Distributes a series to a higher frequency using related series (obsolete: use @DISAGGREGATE instead)


Decomposes a series into trend, seasonal, irregular


Conditional forecasting procedure


Corrado non-parametric event test


Computes a correlation integral for a series


Computes and graphs cross correlations of two series


Computes and graphs phase and coherence


Complex series symmetrizer


Durbin’s Cumulated Periodogram for serial correlation


Computes and displays CUSUM and CUSUMQ tests


Stability tests on a covariance matrix of series


Computes Whittle likelihood using complex matrices


Computes concentrated multivariate Whittle likelihood using complex matrices


Distributes a series to a higher frequency using proportional Denton method (obsolete: use @DISAGGREGATE instead)


Dickey-Fuller unit root test


General disaggregation (interpolation/distribution) procedure


Distribution from one frequency to a higher frequency


Computes a Divisia index


Impulse Reponse Function from a State-Space model


Diebold-Mariano Forecast Comparison Test


Computes Autoregressive Representations using Durbin-Levinson recursion


Extreme Bounds Analysis, from Granger and Uhlig


Computes "exact" critical values for Dickey-Fuller unit root and Engle-Granger cointegration tests.


Engle-Granger test for Cointegration


Engle-Granger test for Cointegration on 1st stage residuals


Computes empirical likelihood for a set of moment conditions


Enders/Granger threshold unit root tests


Enders-Siklos test for cointegration with threshold effect


Creates an ACF from an ARMA equation


Elliott-Rothenberg-Stock unit root tests


Computes exact (limit) inverse with “infinite” components


General Nyblom fluctuations test


Estimates cointegrating vectors using Fully Modified Least Squares


Factors covariance matrix with specific vector column/row


Computes and graphs the gain and phase of a pair of series


Computes parameters required for gamma distribution


Univariate GARCH forecasting procedure


Generates weights and grid points for Gauss-Hermite numerical integration


Generates draws for a generalized error distribution


Generate all combinations of a set of integers


Local to unity GLS detrending routine


Automated ARIMA model selection (seasonal models)


Granger-Newbold forecast comparison test


Geweke-Porter-Hudak estimate of fractional differencing


Graphs a RECTANGULAR array of series on separate graphs


Gregory-Hansen test for cointegration with breaks


Generates a series with an equally spaced grid


Hadri test for unit roots in panel data


Generates Halton sequences


Estimates an ARIMA model using the Hannan-Rissanen algorithm


Performs a HEGY seasonal unit root test for quarterly data


Estimates tail index for a distribution using Hill’s method


Hinich bispectrum test for linearity and Gaussianity


Histogram procedure


Computes Hansen-Jagannathan bounds for a set of returns


Hodrick-Prescott filter (obsolete)


Harris-Tzavalis unit root test for panel data


Computes a Hurst exponent


Inclan-Tiao test for breaks in variance


Computes CDF for quadratic form in Normal(0,1) variables. Obsolete—use functions %QFORMPDF or %QFORMDPDF functions.


Corrects signs of columns in a factor matrix


Interpolation from one frequency to a higher one


Computes parameters required for inverse chi-squared distribution


Computes parameters required for inverse gamma distribution


Im, Pesaran and Shin panel unit root test


Used to build up a set of zero-valued restrictions for impulse responses impact and higher steps


Johansen ML Cointegration analysis


KPSS (Kwiatowski, Phillips, Schmidt, and Shin) stationarity test


Draws from posterior density needed in stochastic volatility model


Creates table of the roots of a lag polynomial


Levin-Lin-Chu test for unit roots in panel data


Limited information maximum likelihood estimation


Creates matrices for local (level or trend) DLM


Calculates initial guesses for component variances in a local level/trend


Local smoothing regression


Function for log density of multivariate skew-t distribution


Computes parameters required for log normal distribution


Function for log density of skew-GED distribution


Function for log density of skew-GED distribution for use with GARCH with DENSITY option.


Function for log density of skew-t distribution


Function for log density of skew-t distribution for use with GARCH with DENSITY option.


Lumsdaine-Papell unit root test with structural breaks


Estimates a dynamic FE model with correction for bias


Lee-Strazicich unit root tests with one or more structural breaks


Computes Information Criteria for MA models using innovations algorithm


Computes Mackinnon’s Critical values for DF and EG tests


Performs Mann-Whitney test for comparison of samples


Functions supporting Markov Chain Models (obsolete use @MSSETUP instead)


Extracting/inserting information from/into rectangular arrays (obsolete: use %XSUBMAT and %PSUBMAT functions instead)


Organizes tables of FEVD’s with confidence bands


Organizes graphs of IRF’s with confidence bands


Performs a McLeod-Li test for 2nd order dependence


Calculates sample statistics from MCMC realizations


Organizes error bands for IRF’s based upon MC results


Does Monte Carlo draws from a VAR to generate IRF’s


Mean group estimator for panel data


Does Mean Excess Return plots


Computes and graphs a spectrum using Maximum Entropy Method


Implements the monthly version of the “HEGY” tests


Mixed estimation of a single equation


Mixed estimation of an equation with a Bayesian prior


Monte Carlo Integration of VAR Impulse Response confidence bands


Markov switching procedures for EM estimation


Markov switching linear regression procedures


Markov switching general support procedures


Markov switching linear systems regression procedures


Markov switching VAR setup procedures


Multiple structural change analysis per Bai-Perron


Multivariate test for ARCH


Multivariate Beveridge-Nelson decomposition via a VAR


Multivariate GARCH forecasting


Extracts a VECH representation from GARCH estimates


Creates a Tiao-Box cross correlation matrix


Multivariate Jarque-Bera normality test


Hosking’s Multivariate Q statistic


Generates dummies based upon NBER cycle dates


Computes Hodrick standard errors


Generates coefficients for an AR from input covariances


Panel data unit root/cointegration testing procedure (Pedroni tests)


Panel data group mean DOLS


Panel data group mean FMOLS


Does analysis of up to two threshold breaks in a fixed effects panel model


Polynomial Distributed Lags regression


Polynomial Distributed Lags regression


Compute various unit root tests with breaks


Compute various Perron-Ng “M” unit root tests


Perron-Rodriguez unit root test allowing for break at unknown date


Sum of coefficients of a MA representation for a series


Phillips-Hannan Efficient estimator for multivariate regressions


Multiplies lag polynomial coefficients. Obsolete: use %POLYMULT function instead.


Phillips-Ouliaris-Hansen test for Cointegration


Phillips-Ouliaris-Hansen test for Cointegration on 1st stage residuals


Phillips-Perron Unit Root test


Extracts principal components


Principal components-based factor analysis


Predicted probabilities for conditional logit model


Predicted probabilities for multinomial logit model


Predictions and marginal effects for Poisson count model


Graphs a Q plot against a hypothesized distribution


Does factor rotation using quartimax criterion


Random draw from a distribution approximated across grid of points


Random draws from a mixture of Normals


Random draws from a truncated Normal (procedure). Obsolete: use %RANTRUNCATE function instead.


Regression post-processing, fancy graph of actual/fitted/resids


Displays an analysis of variance table from most recent regression


Displays a table of confidence intervals from most recent regression


Computes and graphs autocorrelations from residuals


Computes information criteria for most recent regression


Computes the exact significance level for the Durbin-Watson


Performs structural break test with bootstrapped p-values


Computes partial correlations between the regressors and dep var.


Panel-corrected standard error calculation


Regression post-processing, computes recursive resids, does tests (largely obsolete—use RLS instruction instead).


Performs Ramsey RESET test on regression


Creates a TeX equation from the most recent regression


Performs a CART (Classification and Regression Trees) analysis


Performs White neural network test on regression


Performs White heteroscedasticity test on regression


Performs Wu (or Durbin-Wu-Hausman) specification test on regression


Semiparametric fractional differencing parameter estimation


Robust LM test for orthogonality of residuals and input series


Computes rolling regressions for least squares


Computes a Goldfeld-Quandt test on recursive residuals


R/S Statistic (classical or Lo’s modified)


Computes a run test for a two-state series


Creates the matrices for the seasonal component of a DLM


Factor covariance matrix with short and long run restrictions


Forecasting using spectral techniques


Computes/graphs spectral density


Produces an NxN matrix of SCATTER plots


Computes various “Schmidt-Phillips” tests (TAU) for a unit roots


Multivariate spectral density of a state space model


Perfoms Hansen’s stability test for OLS


Performs a standard battery of specification tests for a state space model


Test for linearity vs. LSTAR or ESTAR


Backwards stepwise reduction of a probit model


Stock-Watson and Dickey-Fuller Unit Root Tests


Computes structural residuals from standard residuals


Sets up Gibbs sampler for SUR model


Computes a GLS matrix weighted estimator for a panel data set


Estimates cointegrating vectors using dynamic OLS


Tests cointegration rank using common trends analysis


Estimates a threshold autoregression, tests for threshold effect


Hansen’s Test for Threshold Break


Provides a procedure for doing table lookups


Tsay test for neglected non-linearities


Tsay arranged regression test for threshold autoregression (TAR)


Tse test for constant correlation in MV-GARCH model


Time-varying VAR setup routine


Forecast errors for a univariate model


Computes criteria for Uhlig sign-restricted shocks


Computes required parameters for uniform distribution


Extracts unique values from a series


Sets up a parallel system for bootstrapping a VAR


Does a direct calculation of a simple OLS VAR


Minimum FPE representation for the equations in a VAR


Computes a state space representation to its implied VAR


Does factor rotation using varimax criterion


Organizes graphs of Impulse responses for an estimated VAR


Computes the covariance matrix of an IRF using the delta method


Computes the sums of the VAR lag coefficients (obsolete, use %MODELLAGSUMS function)


Selects lag length for a VAR model


Routines for analyzing a VARMA using DLM


Multivariate spectral density of a Vector Autoregression


Variance ratio random walk test procedure


Heteroscedasticity-robust serial correlation test


Implements Whittle test for independence of state sequences


Computes Information Criteria for AR models using Yule-Walker (obsolete: use @ARAutoLags instead).


Estimates a VAR on stationary data using Yule-Walker Equations


Zivot-Andrews Unit Root Test




Copyright © 2024 Thomas A. Doan