RATS 11
RATS 11

Instructions /

ESTIMATE Instruction

Home Page

← Previous Next →

ESTIMATE( options )   start end

 

ESTIMATE computes estimates for all the equations in the most recently created SYSTEM. ESTIMATE also initializes the Kalman filter for use by the instruction KALMAN, which does sequential coefficient estimation.

Wizard

The Time Series—VAR (Setup/Analyze) Wizard can be used to define and estimate VAR models.

Parameters

start,end

Estimation period. If you have not set a SMPL, this defaults to the maximum range that ESTIMATE can use, taking into account the required lags.

Options

[PRINT]/NOPRINT

[FTESTS]/NOFTESTS

Use NOPRINT to suppress the standard regression output. For a vector autoregressive system, FTESTS prints a set of F–tests after each estimated equation. This tests (for each regression separately) the block of included lags of the dependent variables of the system. NOPRINT will also suppress the F–tests unless you use the FTESTS option explicitly.
 

SMPL=Standard SMPL option [unused]

SPREAD=Standard SPREAD option [unused]

DFC=integer DFC correction [0]

WEIGHT=standard WEIGHT option

These are the same as for LINREG, except that for each option the single value applies to all equations in the system. If you need differing SPREADs, for instance, you must use a set of LINREG instructions instead.

 

SIGMA/[NOSIGMA]

CVOUT=SYMMETRIC matrix

Respectively, these compute and print, or compute and save, the covariance matrix of the residuals. If you use SIGMA, ESTIMATE prints a covariance/correlation matrix. In some older versions, CVOUT was called OUTSIGMA. ESTIMATE will still recognize the old name.

 

RESIDUALS=VECTOR[SERIES] for residuals

This is the most convenient way to get the residuals from the equations of a VAR or other multiple equation system. The option RESIDUALS=RESVAR will create series RESVAR(1),...,RESVAR(n) which will have the residuals from the n equations in the system. Note that residuals are saved internally by default.

 

COEFFS=RECTANGULAR for coefficients

For a VAR, this saves the estimated coefficients in a RECTANGULAR array. Column i of this will be the coefficients from the ith equation.

 

COHISTORY=VECTOR[SERIES] for coefficient history

This can only be used with a single equation model. It is designed to work together with KALMAN to save the coefficient estimates as they are recomputed by the Kalman filter. There will be one series in the VECTOR[SERIES] for each coefficient. ESTIMATE will put its estimates into entry end of these series.
 

MODEL=model to estimate [unused]

ESTIMATE normally estimates the VAR system defined by the most recent SYSTEM/END(SYSTEM) instruction block. If you prefer, you can use the MODEL option to estimate a particular MODEL. This can be useful if you are working with multiple VAR specifications.


Note: MODEL objects do not store Bayesian prior information (defined using the SPECIFY command), so ESTIMATE always does ordinary least squares estimation (i.e. ignoring any priors) when you use the MODEL option. Also, do not use the MODEL option to estimate error-correction model systems defined using the ECT command.

Advanced Options

CMOM=(output) SYMMETRIC matrix [unused]

DUMMY=(output) RECTANGULAR matrix [unused]

OLS/[NOOLS](applies only for systems defined using SPECIFY)

These apply only to systems set up with a prior. CMOM saves the X'X array of the regressors. DUMMY saves the matrix of dummy observations in exactly the form you need for a FULL matrix for SPECIFY. Because the array already includes all the scale factors, don’t use SCALE on SPECIFY if you use this for a FULL array.

 

Use the OLS option if you want ESTIMATE to do ordinary least squares rather than mixed estimation (that is, if you want ESTIMATE to ignore the prior).

Comments

In a vector autoregression, all equations have the same explanatory variables, so ordinary least squares applied equation by equation is efficient. For systems with mixed equations, RATS still estimates by single equation OLS, so there may be some gain in using SUR instead.
 

You can’t do any direct hypothesis tests after an ESTIMATE. You can use RATIO to test certain cross-equation hypotheses, such as lag length restrictions or block exogeneity. If you want to use any restrictions on a single equation, you will have to do a LINREG to estimate that equation in isolation.

Degrees of Freedom Corrections

To compute the standard errors shown in the output, ESTIMATE uses the degrees of freedom correction T-K, where K is the number of parameters in the equation. This is done to match the results that would be obtained by using LINREG to estimate the same equation. However, the residual variance/covariance matrix computed by the SIGMA and CVOUT options and saved as the %SIGMA matrix (used for constructing impulse responses, variance decompositions, etc.) uses a divisor of T:

 

\(\Sigma  = \frac{1}{T}\sum\limits_{t = 1}^T {{{\bf{u}}_t}{{{\bf{u'}}}_t}} \)

      

This is the more general form for \(\Sigma\), as using the degrees of freedom correction is not appropriate for Bayesian or near–VAR models.

Variables Defined

%BETASYS

Stacked coefficient vector (VECTOR)

%LOGDET

log determinant of the estimate of \(\Sigma\) (REAL)

%LOGL

Normal log likelihood (REAL)

%NFREE

free coefficients, including covariance matrix (INTEGER)

%NMISS

number of missing observations (INTEGER)

%NOBS

number of observations (INTEGER)

%NREG

number of regressors in the first equation (INTEGER)

%NREGSYSTEM

total number of regressors in the entire model (INTEGER)

%NVAR

number of equations estimated (INTEGER)

%SIGMA

covariance matrix of residuals (SYMMETRIC)

%VARLAGSUMS

the n x n matrix of the sums of the lag coefficients:\({\bf{I}} - \sum\limits_{s = 1}^p {{\Phi _s}} \)  where \({\Phi _s}\) is the matrix of VAR coefficients for lag s. In an ECT VAR, these are the coefficients on the differenced dependent variables.

%VECMALPHA

(for an ECT VAR only) matrix of loadings on cointegration relations in the VECM

%VECMPI

(for an ECT VAR only) matrix of coefficients on undifferenced lags in the VECM.

%XX

\({\left( {{\bf{X'}}{\kern 1pt} {\bf{X}}} \right)^{ - 1}}\) matrix for the first equation (SYMMETRIC)


Output (from FTESTS option)

For vector autoregressions (systems set up with VARIABLES and LAGS), a set of F-tests is printed after the regression output for each equation:

 

F-Tests, Dependent Variable CANTBILL

Variable            F-Statistic       Signif

CANRGNP                   5.0365     0.0004608

CANM1S                    6.4634     0.0000429

CANTBILL                 20.8706     0.0000000

CANCPINF                  2.7013     0.0262556

CANUSXSR                  0.3259     0.8959781

USARGNP                   3.6541     0.0049852

 

These test the significance of the block of lags associated with each of the variables in turn. In this one, for instance, the significance level of the block of CANCPINF lags in the CANTBILL equation is .0262556. Note that in a VAR with more than two variables, an insignificant result should not (by itself) be interpreted as a lack of causality from the tested variable to the dependent variable—that requires a more formal block exogeneity test.

Examples

system(model=canmodel)

variables usargdps canusxsr cancd90d canm1s canrgdps cancpinf

lags 1 to 4

det constant

end(system)

 

estimate(noprint,cvout=v,residuals=resblock) * 1997:4

 

sets up and estimates a six-variable VAR with four lags, saving the residual covariance matrix in V and the residuals in the VECTOR[SERIES] RESBLOCK. The estimation range runs from the earliest possible time through 1997:4.


 

system(model=canmodel)

variables usargdps canusxsr cancd90d canm1s canrgdps cancpinf

lags 1 to 4

det constant

specify(tight=.15) .5

end(system)

estimate

 

estimates a VAR with a prior.


 

equation checkeq gdp

# constant  gdp{1 to 4}

system checkeq

end(system)

estimate(cohistory=coh,noprint) 5 9

do time=10,2017:3

   kalman(rtype=recursive,cohistory=coh) resids

end do time

 

The ESTIMATE computes the regression over the first five usable time periods (allowing for the four lags) and initializes the Kalman filter. The filter then generates recursive residuals for the remainder of the sample. COH will be a vector of five series which will contain the coefficient estimates from period 9 to 2017:3. COH(1) will be the estimates for the CONSTANT, COH(2) for GDP{1}, etc.


 

linreg(define=eweq) w

# constant y z

*

system(model=vecm)

variables y z w

lags 1 2

det constant

ect eweq

end(system)

*

estimate

 

This estimates a model with cointegration (VECM), where the error correction equation is generated from an "Engle-Granger" regression. The output (for the first equation) is described in "Output for a VECM".

Output for a VECM

This is the output for the first equation in the VECM model demonstrated above. Several things to note:

1.The 2 lags in a VAR setup is the number of lags in the expanded VAR, which reduces to 1 lag as the model is actually estimated.

2.The lagged differenced dependent variables are shown with D_ prefixes on the name of the original variable.

3.The lagged error correction term(s) are shown as ECn, where n is the number. If there is just one cointegrating vector, that will be EC1; if there is more than one, they will be EC2, EC3, etc.
 

Dependent Variable Y

Mean of Dependent Variable       0.0103956122

Std Error of Dependent Variable  0.3270248297

Standard Error of Estimate       0.3151203397

Sum of Squared Residuals         9.2349770506

Durbin-Watson Statistic                1.9036

 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  D_Y{1}                        0.178276649  0.164688865      1.08251  0.28182662

2.  D_Z{1}                        0.312995255  0.161102252      1.94284  0.05506060

3.  D_W{1}                       -0.367720385  0.161967563     -2.27033  0.02549618

4.  Constant                      0.006065021  0.032078520      0.18907  0.85045154

5.  EC1{1}                       -0.417973964  0.150046937     -2.78562  0.00647464


 


Copyright © 2025 Thomas A. Doan