linearmodels.iv.model.IVGMM¶
-
class linearmodels.iv.model.IVGMM(dependent, exog, endog, instruments, *, weights=
None
, weight_type='robust'
, **weight_config)[source]¶ Estimation of IV models using the generalized method of moments (GMM)
- Parameters:¶
- dependent : array_like¶
Endogenous variables (nobs by 1)
- exog : array_like¶
Exogenous regressors (nobs by nexog)
- endog : array_like¶
Endogenous regressors (nobs by nendog)
- instruments : array_like¶
Instrumental variables (nobs by ninstr)
- weights : array_like¶
Observation weights used in estimation
- weight_type : str¶
Name of moment condition weight function to use in the GMM estimation
- **weight_config :
Any
Additional keyword arguments to pass to the moment condition weight function
Notes
Available GMM weight functions are:
“unadjusted”, “homoskedastic” - Assumes moment conditions are homoskedastic
“robust”, “heteroskedastic” - Allows for heteroskedasticity by not autocorrelation
“kernel” - Allows for heteroskedasticity and autocorrelation
“cluster” - Allows for one-way cluster dependence
The estimator is defined as
\[\hat{\beta}_{gmm}=(X'ZW^{-1}Z'X)^{-1}X'ZW^{-1}Z'Y\]where \(W\) is a positive definite weight matrix and \(Z\) contains both the exogenous regressors and the instruments.
Todo
VCV: bootstrap
Methods
estimate_parameters
(x, y, z, w)- type x:
fit
(*[, iter_limit, tol, initial_weight, ...])Estimate model parameters
from_formula
(formula, data, *[, weights, ...])- type formula:
predict
(params, *[, exog, endog, data, eval_env])Predict values for additional data
resids
(params)Compute model residuals
wresids
(params)Compute weighted model residuals
Properties
Formula used to create the model
Flag indicating the model includes a constant or equivalent
Locations of observations with missing values
Locations of observations included in estimation