linearmodels.iv.gmm.HomoskedasticWeightMatrix.weight_matrix

HomoskedasticWeightMatrix.weight_matrix(x: ndarray[tuple[int, ...], dtype[float64]], z: ndarray[tuple[int, ...], dtype[float64]], eps: ndarray[tuple[int, ...], dtype[float64]]) → ndarray[tuple[int, ...], dtype[float64]][source]

Compute the covariance of the moment conditions.

Parameters:
x: ndarray[tuple[int, ...], dtype[float64]]

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

z: ndarray[tuple[int, ...], dtype[float64]]

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

eps: ndarray[tuple[int, ...], dtype[float64]]

Model errors (nobs by 1).

Returns:

Covariance of GMM moment conditions.

Return type:

numpy.ndarray