recsSimulSP Simulates a model from starting values given in s0 and for nper period
SSIM = recsSimulSP(MODEL,INTERP,S0,NPER) simulates the model defined in the
object MODEL, by using the interpolation structure defined in the structure
INTERP. The simulation starts from the initial state S0 and lasts NPER (scalar)
periods. S0 is a nrep-by-d matrix with nrep the number of scenarios to simulate,
and d the number of state variables. recsSimulSP returns the nrep-by-d-by-nper
array SSIM that contains the simulated state variables.
MODEL is an object created by recsmodelsp.
INTERP is a structure, which includes the following fields:
ch : coefficient matrix of the interpolation of the expectations
function (optional, to be provided with method 'expfunapprox')
cx : coefficient matrix of the interpolation of the response variables
cz : coefficient matrix of the interpolation of the expectations variables
fspace : a definition structure for the interpolation family (created by
the function fundef)
SSIM = recsSimulSP(MODEL,INTERP,S0,NPER,OPTIONS) simulates the model with
the parameters defined by the structure OPTIONS. The fields of the structure are
accuracy : 1 to check accuracy on the asymptotic distribution (default: 0)
display : 1 (default) to display outputs
eqsolver : 'fsolve', 'lmmcp' (default), 'ncpsolve' or 'path'
eqsolveroptions : options structure to be passed to eqsolver
extrapolate : 1 if extrapolation is allowed outside the
interpolation space or 0 to forbid it (default: 1)
loop_over_s : 0 (default) to solve all grid points at once, 1 to loop
over each grid points, or n to loop over n blocks of
grid points
simulmethod : 'interpolation' (default) or 'solve'
stat : 1 to ouput summary statistics from the simulation
(default: 0)
[SSIM,XSIM] = recsSimulSP(MODEL,INTERP,S0,NPER,...) returns the nrep-by-m-by-nper
array XSIM that contains the simulated response variables.
[SSIM,XSIM,ESIM] = recsSimulSP(MODEL,INTERP,S0,NPER,...) returns the
nrep-by-q-by-nper array ESIM that contains the shocks.
[SSIM,XSIM,ESIM,STAT] = recsSimulSP(MODEL,INTERP,S0,NPER,...) returns summary
statistics as a structure that contains the number of observations (STAT.N),
the moments (STAT.MOMENTS), the correlation between variables (STAT.COR), and
the autocorrelation (STAT.ACOR). Asking recsSimulSP to return STAT forces the
OPTIONS.STAT to 1.
[SSIM,XSIM,ESIM,STAT,FSIM] = recsSimulSP(MODEL,INTERP,S0,NPER,...) returns the
nrep-by-m-by-nper array FSIM that contains the value of the equilibrium
equations on the simulation.