linearmodels.iv.model._OLS.predict

_OLS.predict(params, *, exog=None, endog=None, data=None, eval_env=4)

Predict values for additional data

Parameters:
params : array_like

Model parameters (nvar by 1)

exog : array_like

Exogenous regressors (nobs by nexog)

endog : array_like

Endogenous regressors (nobs by nendog)

data : DataFrame

Values to use when making predictions from a model constructed from a formula

eval_env : int

Depth of use when evaluating formulas.

Returns:

Fitted values from supplied data and parameters

Return type:

DataFrame

Notes

The number of parameters must satisfy nvar = nexog + nendog.

When using exog and endog, regressor matrix is constructed as [exog, endog] and so parameters must be aligned to this structure. The the the same structure used in model estimation.

If data is not none, then exog and endog must be none. Predictions from models constructed using formulas can be computed using either exog and endog, which will treat these are arrays of values corresponding to the formula-processed data, or using data which will be processed using the formula used to construct the values corresponding to the original model specification.