linearmodels.system.gmm.HomoskedasticWeightMatrix.weight_matrix

HomoskedasticWeightMatrix.weight_matrix(x: Sequence[ndarray], z: Sequence[ndarray], eps: ndarray, *, sigma: ndarray) ndarray[source]

Construct a GMM weight matrix for a model.

Parameters:
x: Sequence[ndarray]

List of containing model regressors for each equation in the system

z: Sequence[ndarray]

List of containing instruments for each equation in the system

eps: ndarray

Model errors (nobs by neqn)

sigma: ndarray

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

Returns:

Covariance of GMM moment conditions.

Return type:

numpy.ndarray