statsmodels.sandbox.regression.gmm.IVGMM.calc_weightmatrix#

IVGMM.calc_weightmatrix(moms, weights_method='cov', wargs=(), params=None)#

calculate omega or the weighting matrix

Parameters:
momsndarray

moment conditions (nobs x nmoms) for all observations evaluated at a parameter value

weights_methodstr ‘cov’

If method=’cov’ is cov then the matrix is calculated as simple covariance of the moment conditions. see fit method for available options for the weight and covariance matrix

wargstuple or dict

parameters that are required by some kernel methods to estimate the long-run covariance. Not used yet.

paramsndarray, optional

parameter values at which the moment conditions were evaluated. Required for weights_method=’iid’ where the error term needs to be recomputed.

Returns:
warray (nmoms, nmoms)

estimate for the weighting matrix or covariance of the moment condition

Notes

currently a constant cutoff window is used TODO: implement long-run cov estimators, kernel-based

Newey-West Andrews Andrews-Moy????

References

Greene Hansen, Bruce