Function Help: recsFirstGuess | View code for recsFirstGuess | Function Reference |

recsFirstGuess

recsFirstGuess finds a first guess using the perfect foresight solution recsFirstGuess 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 = recsFirstGuess(INTERP,MODEL,S,SSS,XSS) uses the interpolation structure defined in the structure INTERP to fit the perfect foresight solution of the model defined in the structure MODEL. The grid of state variables is provided in the n-by-d matrix S. A first guess for the steady state of the model is provided in SSS and XSS for state and response variables. recsFirstGuess 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 = recsFirstGuess(INTERP,MODEL,S,SSS,XSS,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) UseParallel : 'always' (default) to use parallel calculation (require Parallel Computing Toolbox)' or never' [INTERP,X] = recsFirstGuess(INTERP,MODEL,S,SSS,XSS,...) returns X, n-by-m matrix, containing the value of the response variables in the first period. [INTERP,X,Z] = recsFirstGuess(INTERP,MODEL,S,SSS,XSS,...) returns Z, n-by-p matrix, containing the value of the expectations variables in the first period. [INTERP,X,Z,EXITFLAG] = recsFirstGuess(INTERP,MODEL,S,SSS,XSS,...) [INTERP,X,Z,EXITFLAG,OUTPUT] = recsFirstGuess(INTERP,MODEL,S,SSS,XSS,...)