linearmodels.system.gmm.HeteroskedasticWeightMatrix.weight_matrix

HeteroskedasticWeightMatrix.weight_matrix(x, z, eps, *, sigma=None)[source]

Construct a GMM weight matrix for a model.

Parameters:
xlist[ndarray]

Model regressors (exog and endog), (nobs by nvar)

zlist[ndarray]

Model instruments (exog and instruments), (nobs by ninstr)

epsndarray

Model errors (nobs by 1)

sigmandarray

Fixed covariance of model errors. If None, estimated from eps.

Returns:
ndarray

Covariance of GMM moment conditions.

Return type:

Float64Array