The file MATRIX2.MAC contains a number of subroutines that can be loaded and run with the matrix command. These subroutines files include production matrix commands and those of less interest. The command call load(subname); load these routines so that they can be called by user programs. The staging2.mac contains a number of routunes that are self documented in the comments of the routine. These are loaded with the command call load(subname :staging) More specialized routines are contained in wbsuppl.mac and are loaded with call ooad(subname :wbsuppl); Routines listed in matrix2.mac include MATRIX command functions and subroutines. Users can add commands to the matrix2.mac file. Users are warned that if new versions of b34s are loaded, the matrix2.mac file will be updated which will result in any user routines being lost. As an alternative a user routine mytest in file mylib.mac could be loaded with the command call load(mytest,'c:\mydir\mylib.mac'); It is recommended that comments on the use of a routine be placed at the beginning of the file using the /$ comment form. Unless otherwise stated, test programs for these routines are contained in matrix.mac file The library staging2.mac contains potential production subroutines that have not been moved to matrix2.mac. Help files are placed in these routines and examples are also shown. Running examples are found in staging.mac. Routines in staging2.mac can be loaded with the command call load(kk :staging); where kk is the routine name. Index of Routines in MATRIX2.mac and staging2.mac Mac file name c:\b34slm\lib\matrix2.mac Name Heading ACF_PLOT Plot ACF ALTSE Copies lower triangle to upper and gets SE AUTOCOV Autocovaiance BJ_IDEN List / Plot ACF and PACF B_G_TEST Breusch- Godfrey (1978) Test on Residuals B_G_ALT Breusch- Godfrey (1978) Test using dropping BLUS BLUS master BPF Baxter - King Symmetric MA Filter BPFM Baxter - King Symmetric MA Filter - Missing Data at BUILDLAG Builds NEWY and NEWX for VAR Modeling CCFTEST Tests Cross Correlations CFREQ Determine Frequency Distribution COINT2 Cointegreation of Two Series COINT2LM Cointegreation of Two Series - Gives L1 and Minimax COINT2M Moving Cointegration of Two Series - Simple Version COINT2M2 Moving Cointegration Two Series OLS, L1 Minimax COINT2ME Moving Cointegration of Two Series - Extended Versi COINT3 Cointegration of Three Series COINT3ME Moving Cointegration of Three Series DATAVIEW Interactively View Data DATA_ACF Plot ACF and PACF of a series DATA2ACF Plot ACF and PACF of a series with file name DF_GLS Elliott-Rothenberg-Stock DF_GLS Test DIST_TAB Distribution Table DO_SPEC View Spectrum DO2SPEC View Spectrum with a file name DUD Derivative Free Nonlinear Estimation DUD2 Derivative Free Nonlinear Estimation FDIFINFO Fractional Differencing FILTER High Low Pass Filter using Real FFT FILTERC High Low Pass Filter using Complex FFT FORPLOT Forecast Plot GARCH2P Two Pass GARCH Using ARMA Command GARCH2PF Two Pass GARCH Using ARMA Command with Forecasts GET_NAME Get Name of a Matrix Variable GTEST Tests ARCH / GARCH Models GWRITE Save Matrix Object in GAUSS Format using one file GWRITE2 Pass Large Datasets to GAUSS in 2 files HP_2 Hodrick - Prescott Moving Filtering HP_BP_1 Baxter - King & Hodrick - Prescott Filtering HP_BP_2 Baxter - King & Hodrick - Prescott Moving Filtering IRF Impulse Response Functions for VAR Model KSWTEST K Period Stock Watson Test KSWTESTM Moving Period Stock Watson Test LAGTEST 3-D Graph to display RSS for Various OLS Lags LAGTEST2 3-D Graph to display RSS for Various MARS Lags LMTEST Engle LM test for a Range of lags MARQ Estimation of a Nonlinear Model using Derivatives MARSPLOT Plot MARS Curves & Surfaces MCLEODLI McLeod-Li (1983) Linearity test (y,ip,maxacf) MINIMAX Minimax Estimation using MAXF2 MISSPLOT Plots Data With Missing Values MOVEAVE Moving average of a vector MOVEBJ Moving Arima Forecast using AUTOBJ MOVECORR Moving Correlation of two vectors MOVEH82 Moving Hinich 82 test MOVEH96 Moving Hinich 96 test MOVEOLS Moving OLS with LAGS MOVEVAR Moving Variance NLVARCOV NLLSQ Variance Covariance OLSPLOT Plot of Fitted and Actual Data & Res PAD Pad a 1D Real*8 Series on both ends PERMUTE Reorder a Square Matrix POLYFIT Fit an nth Order Regression POLYVAL Evaluate an nth Order Polynominam Regression PVALUE_1 Present value of $1 recieved at end of n years PVALUE_2 Present Value of an Annuity of $1 PVALUE_3 Present value of $1 recieved throughout year QUANTREG Quantile Regression RESET69 Ramsey(1969) Regression Specification Test RESET77 RESET77 Nonlinearitry Test RMATLAB Runs Matlab commands RRPLOTS Plots Recursive Residual Data RTEST Tests Residuals of TS Models RTEST2 Tests Residuals of TS Models - No Res and y Plots SUBSET Subset an array under mask control SWARTEST Stock-Watson AR Test TESTFUN Test Function TESTPGM Test Program TESTSUB Test Subroutine VAREST VAR Modeling Mac file name c:\b34slm\lib\staging2.mac Name Heading ACE_OLS Tests ACE Model using OLS ACE_PLOT Plot ACE Response Curves BOOTOLS Bootstrap OLS Model BOOTL1 Bootstrap L1 Model BOOTMM Bootstrap MM Model COR Correlation of a matrix. COV Calculated Covariance of a matrix COND Condition of a Matrix DFVALUES Estimate of DF/PP Critical Values DISPMARS Displays Mars Model F_MARSLG Adjusts yhat and forecasts from MARSPLINE G4TEST Pena-Slate JASA March (2006) Joint OLS Test GAMPLOT Display GAMFIT Results GARCHF Forecast ARCH / GARCH Series GARCH2PA Automatic GARCH Two Pass Modeling GENGARCH Simulate GARCH and ARCH Models GETCHAR Unpack a string into Character Array GETDATA Simple Real*8 data Read routine GETDATA2 Simple Real*16 data Read routine GETR16 Unpack a string into Real*16 Array GETVPA Unpack a string into VPA Array GETR8 Unpack a string into Real*8 Array GLESJER Glesjer (1969) Heteroscedasticity Test GLS Cochrane & Orcutt GLS Estimation of AR(k) Model GLSDATA Transform x to x* given GLS rho vector GLS_ML GLS_ML Maximum Likelihood estimation of AR(1) Model GLS_2P Two Pass Generalized Least Squares for Order K GPH Geweke & Porter-Hudak (1983) Fractional Diff. Test G_QUANDT Goldfeld-Quandt Heteroscedasticity Test HET_TEST Heteroscedasticity Testing IACF Inverse ACF LASSO LASSO Shrinkage Approach MARSINFO Estimate of MARSPLINE Model GCV Info MCOVF Function for Covariance. See built in mcov( ) NORM NORM(X,i) of a matrix or vector NTOKIN Counts number of tokins in a string NW_SE Newey West SE Correction Calculation OLS_CON Constrained OLS Model P_L_EST Probit & Logit Estimation PANEL_LIB Panel Subroutine Library QR_SMALL Break Appart QR Factorization RIDGE Ridge Regression RNW_SE Run Newey West SE Correction for OLS Model SC_TEST Serial Correlation Tests SVD_OLS OLS Using SVD Approach SVD2_OLS OLS Using SVD Approach and LAPACK TLOGIT Tests Logit/Probit Model TS_TESTS Residual Specification tests TSALIGN Align Time Series Data UNDIF Undifference a series WALD Wald Test of restrictions Detailed discussion of routines that are NOT part of the production routines but are distributed with B34S. All other routines are discussed as part of the Matrix Command help files.