Solver of the model, wrapped from nleqslv.

model_solve(
  CONFIG,
  FUN,
  XSTART = rep(100, 144),
  BTOL = 0.01,
  MAXIT = 1000,
  MESSAGE = T
)

Arguments

CONFIG

The configuration generated from model.shock.config

FUN

A function (passed to nleqslv) of XSTART returning a vector of function values with the same length as XSTART

XSTART

A numeric vector with initial values for solving, e.g., rep(100,144)

BTOL

Passed to btol in nleqslv

MAXIT

Passed to maxit in nleqslv

MESSAGE

If T, print solution message

Value

A list of model solution (model.sol) and output data (outDB)