Skip to content

Solving models

In the app: Help → Help contents, Solving models.

A model is a system of estimated equations and identities solved period by period for its endogenous variables. Newton's method solves all equations jointly using their derivatives; Gauss-Seidel updates each equation's own variable in turn and is cheaper per iteration but may need damping to converge. Models with expected future values need the forward-looking methods.

By default a period has converged when every equation's residual is below the tolerance, a test in the equations' own units; the step test (Convergence: step) stops instead when no variable moves by more than the tolerance relative to its size, whatever the units. Newton's line search halves a step that would not reduce the residuals, for starting values far from the solution, and Refresh: period keeps one Jacobian a period while convergence is fast. Fallback retries a period the solver cannot solve with damped Gauss-Seidel, then Newton with a line search; Ordering: blocks solves the recursive equations once each, in order, and iterates only on the simultaneous blocks, much less work for a mostly recursive model.

A stochastic simulation solves the model many times, each time with errors drawn for the estimated equations (normal, with their standard errors and correlations, or the residuals resampled), and perhaps their coefficients too. The spread of the draws shows how uncertain the paths are: quantiles give fan charts. For a nonlinear model the draws' mean can differ from the deterministic solution. A sample of residuals can be given instead (Error draws: The data's residuals): historical errors by equation, resampled a whole period at a time, as the Federal Reserve's stochastic simulations of FRB/US draw them.

Add factors (Model > Solution > Add factors) are each equation's residual at the data over a span: solved with them, the model reproduces the data, so a scenario reads as a deviation from that baseline. Optimal control (Model > Policy > Optimal control) moves exogenous instruments, period by period, to minimise a discounted quadratic loss with the model solved as the constraint. Models in the FRB/US XML format, and EViews state-space objects, are read under Model > Import.

A fixed or held variable can apply in some periods only (Scenario partial; in Model > Solution > Solve model, Hold only where given under Advanced, for holds): where its path has a value the variable is exogenous, elsewhere its equation determines it. Before solving, Model > Check model (or missing_inputs in code) lists each period, equation and input the solve would lack. A solution's Convergence view shows, period by period, the iterations and the largest residual left with its equation; a period that fails to converge stops the solve, and the error (its convergence table in code) names that period.

See also

References

  • Hall, S. G. and Henry, S. G. B. (1988). Macroeconomic Modelling. North-Holland. (search)
  • Fair, R. C. (1980). Estimating the expected predictive accuracy of econometric models. International Economic Review 21(2), 355-378. doi:10.2307/2526186