RATS 10.1
RATS 10.1

GROUP( options )  model   list of frml>>result
 

Groups formulas and/or equations to create a MODEL for systems estimation, simulation, forecasting and DSGE model solution. There is no limit on the number of equations and formulas you can include in a model.

Parameters

model

The MODEL being created.

frml>>result

This lists the name of the EQUATION or FRML, and the series which is to hold the simulations for the dependent variable of the forecast. The ">>result" portion is optional. For example, you might want to save the simulations for some formulas in the model, but not for others. (In most cases, the instruction(s) in which you use the MODEL will have some way to capture the output as well).

 

You can use a VECTOR[FRML] or VECTOR[EQUATION] to make up all or part of the list. If you do that, you can't use the >> on those.

Options

CV=SYMMETRIC covariance matrix of residuals (from structural equations)

This option provides the (default) covariance matrix for the residuals if you do SIMULATE, ERRORS or IMPULSE; you can also input this matrix directly into those instructions using their own CV options. The matrix should have dimensions of \(N \times N\), where \(N\) is the number of structural equations (non-identities) in the model. (The older VCV is a synonym for CV).

Setting Up Your Model

Your model will consist of estimated structural equations and identities. You should list the identities last if you’re going to use SIMULATE. No variable should be the dependent variable in more than one formula. Although the identities and  are equivalent, you cannot use the second form if there is a structural equation for C in the system.
 

When you have non-linearities such as mixed logs and levels, you must also add definitional formulas for these transformations. These formulas usually mimic the SET instructions used to define the variables in the first place. For instance, in the model on pages 390-399 of Pindyck and Rubinfeld (1998) (and used in the discussion of Simultaneous Equations) every equation is linear in its variables. However, the model uses many transformations, so you would need to close the model with the following identities

 

frml(identity) gnpid gnp = cons+invest+govt

set ydiff = gnp-gnp{1}

frml(identity) ydiffid ydiff = gnp-gnp{1}

set rsum  = rate+rate{1}

frml(identity) rsumid rsum = rate+rate{1}

group prsmall conseq>>f_cons  investeq>>f_invest $

rateeq>>f_rate  gnpid>>f_gnp  rsumid ydiffid


 

For forecasting purposes, the model should be constructed with identities last, and with each endogenous variable appearing as the dependent variable in one and only one formula. These restrictions are due to the Gauss-Seidel algorithm used to solve models.

Examples

This groups three univariate autoregressions to form a model named AR1, and uses that for the mean model for the GARCH.

 

equation(constant) jpneq xjpn 1

equation(constant) fraeq xfra 1

equation(constant) suieq xsui 1

group ar1 jpneq fraeq suieq

garch(p=1,q=1,model=ar1,mv=dcc,pmethod=simplex,piter=10)


 

This defines six equations (four identities and two defining shocks) and groups them into a model for solution by DSGE.

 

declare series a1 a2 eps eta

declare real   alpha lambda sig_eta sig_eps

*

frml(identity) f1 = x -(x{1}+a1-lambda*a1{1})

frml(identity) f2 = mu-$

    ((1-lambda)*x{1}+lambda*mu{1}+a2-lambda*a2{1})

frml(identity) f3 = a1-1.0/(lambda+(1-lambda)*alpha)*(eps-eta)

frml(identity) f4 = a2-(1.0/(lambda+(1-lambda)*alpha)*$

                      ((1+alpha*(1-lambda))*eps-(1-lambda)*eta))

frml           d1 = eps

frml           d2 = eta

*

group cagan f1 f2 f3 f4 d1 d2


 

This creates a two linear equations, groups them into the model GRUNFELD and estimates it with SUR.

 

equation  geeq  ige

# constant  fge   cge

equation  westeq  iwest

# constant  fwest cwest

*

group grunfeld geeq westeq

sur(model=grunfeld)


 

This creates three equations to describe the exogenous variables in a simultaneous system, groups them into a model called EXOGS, then "adds" it to the existing structural model for forecasting.

 

linreg(define=moneyeq) m

# constant m{1 2}

linreg(define=govteq) govt

# constant govt{1 2}

frml(identity) mdiffid mdiff = m-m{1}

group exogs moneyeq govteq mdiffid

forecast(model=exogs+prsmall,print,from=1986:1,to=1990:4)


 


Copyright © 2025 Thomas A. Doan