recsFirstGuessSP finds a first guess using the perfect foresight solution
recsFirstGuessSP tries to find a first-guess for the rational expectations model
by solving the corresponding perfect foresight solution on all the grid points
of the state variables. By default, it considers that the model goes back to
its deterministic steady state in 50 periods.
INTERP = recsFirstGuessSP(MODEL,INTERP) uses the interpolation structure
defined in the structure INTERP to fit the perfect foresight solution of the
model defined in the structure MODEL. recsFirstGuessSP returns an
interpolation structure, INTERP, containing the first guess.
INTERP is a structure, which has to include the following fields:
fspace : a definition structure for the interpolation family (created
by the function fundef)
MODEL is an object created by recsmodel.
INTERP = recsFirstGuessSP(MODEL,INTERP,OPTIONS) solves the problem
with the parameters defined by the structure OPTIONS. The fields of the
structure are
eqsolver : 'fsolve', 'lmmcp' (default), 'ncpsolve' or 'path'
eqsolveroptions : options structure to be passed to eqsolver (default:
empty structure)
fgmethod : 'auto' (default), 'perturbation', 'perfect-foresight' or
'steady-state'
T : integer defining the time horizon at which the model is
supposed to converge to its steady state (default: 50)
[INTERP,X] = recsFirstGuessSP(MODEL,INTERP) returns X, n-by-m matrix,
containing the value of the response variables in the first period.
[INTERP,X,Z] = recsFirstGuessSP(MODEL,INTERP) returns Z, n-by-p matrix,
containing the value of the expectations variables in the first period.
[INTERP,X,Z,EXITFLAG] = recsFirstGuessSP(MODEL,INTERP)
[INTERP,X,Z,EXITFLAG,OUTPUT] = recsFirstGuessSP(MODEL,INTERP)