estimated_params; theta, 14.627, 8, 15; m_1, 0.7383, 0.5, 0.99; m_2, 0.1543, 0.05, 0.5; m_3, 0.3019, 0.2, 0.4; sigma_m, 0.0105, 0.00000001, 0.5; sigma_a_1, 3.3737, 0.5, 5; rho_a_1, 0.8901, 0.8, 0.99; sigma_a_2, 11.6823, 1, 14; rho_a_2, 0.5294, 0.00001, 0.7; sigma_a_3, 0.0204, 0.000001, 0.4; rho_a_3, 0.7012, 0.1, 0.99; end; estimated_params_init(use_calibration); end; %-------------------------------------------------------------------------- % Method of Moments Estimation %-------------------------------------------------------------------------- varobs mean_markup aux_pi_B aux_pi_1 aux_pi_2 aux_pi_3 i pi_1 pi_2 pi_3; matched_moments; mean_markup; aux_pi_B*aux_pi_B; % variance aux_pi_1*aux_pi_1; % variance aux_pi_2*aux_pi_2; % variance aux_pi_3*aux_pi_3; % variance aux_pi_B*aux_pi_1; % covariance aux_pi_B*aux_pi_2; % covariance aux_pi_B*aux_pi_3; % covariance i*i; % variance pi_1*pi_1; % variance pi_1*pi_1(-1); % autocovariance pi_2*pi_2; % variance pi_2*pi_2(-1); % autocovariance pi_3*pi_3; % variance pi_3*pi_3(-1); % autocovariance end; method_of_moments( % Necessery options mom_method = SMM % method of moments method; possible values: GMM|SMM , datafile = 'data_smm_in_dynare.mat' % name of filename with data % Options for both GMM and SMM % , bartlett_kernel_lag = 20 % bandwith in optimal weighting matrix , order = 1 % order of Taylor approximation in perturbation % , penalized_estimator % include deviation from prior mean as additional moment restriction and use prior precision as weight % , pruning % use pruned state space system at higher-order % , verbose % display and store intermediate estimation results , weighting_matrix=['DIAGONAL','OPTIMAL'] % weighting_matrix=['DIAGONAL','OPTIMAL'] weighting_matrix = ['IDENTITY_MATRIX'] % weighting matrix in moments distance objective function; possible values: OPTIMAL|IDENTITY_MATRIX|DIAGONAL|filename. Size of cell determines stages in iterated estimation, e.g. two state with ['DIAGONAL','OPTIMAL'] % , weighting_matrix_scaling_factor=1 % scaling of weighting matrix in objective function , se_tolx=1e-5 % step size for numerical computation of standard errors % Options for SMM % , burnin=500 % number of periods dropped at beginning of simulation % , bounded_shock_support % trim shocks in simulation to +- 2 stdev % , seed = 24051986 % seed used in simulations %, simulation_multiple = 5 % multiple of the data length used for simulation % Options for GMM % , analytic_standard_errors % compute standard errors using analytical derivatives % General options % , dirname = 'MM' % directory in which to store estimation output % , graph_format = EPS % specify the file format(s) for graphs saved to disk % , nodisplay % do not display the graphs, but still save them to disk % , nograph % do not create graphs (which implies that they are not saved to the disk nor displayed) % , noprint % do not print stuff to console % , plot_priors = 1 % control plotting of priors % , prior_trunc = 1e-10 % probability of extreme values of the prior density that is ignored when computing bounds for the parameters , TeX % print TeX tables and graphics % Data and model options % , first_obs = 501 % number of first observation % , logdata % if data is already in logs % , nobs = 250 % number of observations % , prefilter=1 % demean each data series by its empirical mean and use centered moments % , xls_sheet = data % name/number of sheet with data in Excel % , xls_range = B2:D200 % range of data in Excel sheet % Optimization options that can be set by the user in the mod file, otherwise default values are provided % , huge_number=1e7 % value for replacing the infinite bounds on parameters by finite numbers. Used by some optimizers for numerical reasons , mode_compute = 2 % specifies the optimizer for minimization of moments distance; Default: 13 for GMM and SMM , additional_optimizer_steps = [13] % vector of additional mode-finders run after mode_compute % optim: a list of NAME and VALUE pairs to set options for the optimization routines. Available options depend on mode_compute, some exemplary common options: , optim = ('TolFun' , 1D-16 % termination tolerance on the function value, a positive scalar % ,'TolX' , 1e-16 % termination tolerance on x, a positive scalar % ,'MaxIter' , 3000 % maximum number of iterations allowed, a positive integer % ,'MaxFunEvals' , 1D6 % maximum number of function evaluations allowed, a positive integer % ,'UseParallel' , 1 % when true (and supported by optimizer) solver estimates gradients in parallel (using Matlab/Octave's parallel toolbox) % ,'Jacobian' , 'off' % when 'off' gradient-based solvers approximate Jacobian using finite differences; for GMM we can also pass the analytical Jacobian to gradient-based solvers by setting this 'on' ) % , silent_optimizer % run minimization of moments distance silently without displaying results or saving files in between % Numerical algorithms options % , aim_solver % Use AIM algorithm to compute perturbation approximation % , k_order_solver % use k_order_solver in higher order perturbation approximations % , dr=default % method used to compute the decision rule; possible values are DEFAULT, CYCLE_REDUCTION, LOGARITHMIC_REDUCTION % , dr_cycle_reduction_tol = 1e-7 % convergence criterion used in the cycle reduction algorithm % , dr_logarithmic_reduction_tol = 1e-12 % convergence criterion used in the logarithmic reduction algorithm % , dr_logarithmic_reduction_maxiter = 100 % maximum number of iterations used in the logarithmic reduction algorithm % , lyapunov = DEFAULT % algorithm used to solve lyapunov equations; possible values are DEFAULT, FIXED_POINT, DOUBLING, SQUARE_ROOT_SOLVER % , lyapunov_complex_threshold = 1e-15 % complex block threshold for the upper triangular matrix in symmetric Lyapunov equation solver % , lyapunov_fixed_point_tol = 1e-10 % convergence criterion used in the fixed point Lyapunov solver % , lyapunov_doubling_tol = 1e-16 % convergence criterion used in the doubling algorithm % , sylvester = default % algorithm to solve Sylvester equation; possible values are DEFAULT, FIXED_POINT % , sylvester_fixed_point_tol = 1e-12 % convergence criterion used in the fixed point Sylvester solver % , qz_criterium = 0.999999 % value used to split stable from unstable eigenvalues in reordering the Generalized Schur decomposition used for solving first order problems % , qz_zero_threshold = 1e-6 % value used to test if a generalized eigenvalue is 0/0 in the generalized Schur decomposition % , schur_vec_tol=1e-11 % tolerance level used to find nonstationary variables in Schur decomposition of the transition matrix , mode_check % plot the target function for values around the computed minimum for each estimated parameter in turn % , mode_check_neighbourhood_size = 5 % width of the window (expressed in percentage deviation) around the computed minimum to be displayed on the diagnostic plots % , mode_check_symmetric_plots=1 % ensure that the check plots are symmetric around the minimum % , mode_check_number_of_points = 20 % number of points around the minimum where the target function is evaluated (for each parameter) );