linearmodels.iv.model._OLS

class _OLS(dependent, exog, *, weights=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:
dependentarray_like

Endogenous variables (nobs by 1)

exogarray_like

Exogenous regressors (nobs by nexog)

weightsarray_like

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.

Attributes:
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

Methods

estimate_parameters(x, y, z, kappa)

Parameter estimation without error checking

fit(*[, cov_type, debiased])

Estimate model parameters

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

Parameters:

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