linearmodels.iv.model._OLS

class linearmodels.iv.model._OLS(dependent: IVData | ndarray | DataArray | DataFrame | Series, exog: IVData | ndarray | DataArray | DataFrame | Series, *, weights: IVData | ndarray | DataArray | DataFrame | Series | None = None)[source]

Computes OLS estimates when required

Private class used when model reduces to OLS. Should use the statsmodels version when neeeding a supported public API.

Parameters:
dependent: IVData | ndarray | DataArray | DataFrame | Series

Endogenous variables (nobs by 1)

exog: IVData | ndarray | DataArray | DataFrame | Series

Exogenous regressors (nobs by nexog)

weights: IVData | ndarray | DataArray | DataFrame | Series | None = None

Observation weights used in estimation

Notes

Uses IV2SLS internally by setting endog and instruments to None. Uses IVLIML with kappa=0 to estimate OLS models.

Methods

estimate_parameters(x, y, z, kappa)

Parameter estimation without error checking

fit(*[, cov_type, debiased])

Estimate model parameters

from_formula(formula, data, *[, weights, ...])

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

Formula used to create the model

has_constant

Flag indicating the model includes a constant or equivalent

isnull

Locations of observations with missing values

notnull

Locations of observations included in estimation