Econometrics

  • This set of methods is concerned with inference about an SMM.MAlgoBGP
  • This is mostly standard GMM technology
SMM.FD_gradientMethod
FD_gradient(m::MProb,p::Dict;step_perc=0.005,diff_method=:forward)

Get the gradient of the moment function wrt to some parameter vector via finite difference approximation. The output is a (k,n) matrix, where $k$ is the number of m.params_to_sample and where $m$ is the number of moments.

  • step_perc: step size in percent of parameter
  • diff_method: :forward or :central differencing
  • use_range: compute the step as a percentage of the parameter range (true), or not

The default step size is 1% of the parameter range.

source
SMM.getSigmaMethod
getSigma(m::MProb,p::Union{Dict,OrderedDict},reps::Int)

Computes var-cov matrix of simulated data. This requires to unseed the random shock sequences in the objective function (to generate randomly different moments in each run). Argument reps controls how many samples of different moment functions should be taken.

source
SMM.get_stdErrorsMethod
get_stdErrors(m::MProb,p::Union{Dict,OrderedDict};reps=300)

Computes standard errors according to standard sandwich formula:

\[S = (J W J')^{-1} (J W \Sigma W J') (J W J')^{-1}\]

where

  1. $\Sigma$ is the data var-cov matrix generated by drawing H samples of simulated data using p. each draw has a different shock sequence here. this is done in function getSigma.
  2. $J$ is the gradient of the objective function obtained with FD_gradient
  3. $W$ is the weighting matrix.
source