.. index:: mcfprop .. _mcfprop: .. _monte_carlo_filtration_support: The properties ~~~~~~~~~~~~~~~ .. index:: mcfprop.kf_filtering_level .. _mcfprop.kf_filtering_level: kf_filtering_level """"""""""""""""""" mcfprop/kf_filtering_level is a property. .. index:: mcfprop.npar .. _mcfprop.npar: npar """"" mcfprop/npar is a property. .. index:: mcfprop.nprops .. _mcfprop.nprops: nprops """"""" mcfprop/nprops is a property. The methods ~~~~~~~~~~~~ .. index:: mcfprop.add .. _mcfprop.add: add """" ADD : adds behaviors to check to an mcfprop object This method allows for dynamic addition of properties to be checked or analyzed within the model. Syntax: obj = add(obj, prop1, prop2,..., propn) Input: prop - Property definition, either as a string or a cell array specifying the property and the function handle for evaluation Output: obj - Updated mcfprop object with the new property added See the constructor for more details on the list of behaviors admissible. .. index:: mcfprop.create_handle .. _mcfprop.create_handle: create_handle """""""""""""" Creates a function handle for evaluating defined properties This function handle can be used for Monte Carlo simulations or other forms of model analysis to evaluate how the model behaves under various parameter configurations. Input: singleOutput - Optional. A boolean indicating whether to return a single output from the evaluation function. Default is false. Output: propfun - A function handle that can be used to evaluate model properties The function handle will be later on passed to the mcf function for sampling. .. index:: mcfprop.mcfprop .. _mcfprop.mcfprop: mcfprop """""""" Constructor for mcfprop class This initializes an mcfprop object with a specified DSGE model and a list of parameters. Additional properties, which define specific behaviors or characteristics to investigate within the model, can be defined at initialization or added later using the add method. Syntax: obj = mcfprop(model, paramList) obj = mcfprop(model, paramList, prop1, prop2, ..., propn) Inputs:: model - A DSGE or RISE model object. paramList - Cell array of parameter names to be sampled. prop1,... - Properties to be monitored; these can be defined as: - A character vector for simple properties or explicit shorthand - A function handle for custom evaluations - A 1x2 cell array for detailed behavior specification Supported Properties: Simple properties: - 'solve', 'pb_sstate', 'pb_trans_matrix', etc., represent various checks like solution existence, steady state issues, etc. Explicit shorthands: - Impulse responses (e.g., 'irf{Xi,Ej} > 0.5') - Correlations and covariances (e.g., 'corr{Xi,Xj,3} < 0.2') - Variance decompositions (e.g., 'vd{Xi,Xj,inf,2} == 0.9') - First-order solution components (e.g., 'Tz{Xi,Xj{-1},1} ~= 0') Advanced properties using function handles: When a function handle is provided, it should: - Accept a model object and a structure of filtering output as inputs - Return a boolean value indicating if the property is satisfied - Optionally include a second element in the cell specifying the filtering level: 0 = no filtering, 1 = prediction only, 2 = prediction and update, 3 = full smoothing Outputs:: obj - An instance of the mcfprop class with the specified properties initialized. Examples:: % Initializing with a model and parameters, no properties obj = mcfprop(model, {'alpha', 'beta'}); % Initializing with a simple property obj = mcfprop(model, {'alpha', 'beta'}, 'solve'); % Using advanced properties with explicit shorthand and relational operators obj = mcfprop(model, {'alpha', 'beta'}, 'irf{X1,E1} > 0.5'); % Custom function handle with filtering level specified obj = mcfprop(model, {'alpha', 'beta'}, {@myCustomFunction, 3}); function flag = myCustomFunction(m, filtr) % Custom evaluation logic returning a boolean flag = mean(filtr.smoothed.variables.X1) > 0; end .. seealso:: ADD, CREATE_HANDLE