linearmodels.iv.results.IVGMMResults.predict

IVGMMResults.predict(exog=None, endog=None, *, data=None, fitted=True, idiosyncratic=False, missing=False)

In- and out-of-sample predictions

Parameters
exogarray_like

Exogenous values to use in out-of-sample prediction (nobs by nexog)

endogarray_like

Endogenous values to use in out-of-sample prediction (nobs by nendog)

dataDataFrame

DataFrame to use for out-of-sample predictions when model was constructed using a formula.

fittedbool

Flag indicating whether to include the fitted values

idiosyncraticbool

Flag indicating whether to include the estimated idiosyncratic shock

missingbool

Flag indicating to adjust for dropped observations. If True, the values returned will have the same size as the original input data before filtering missing values. If False, then missing observations will not be returned.

Returns
DataFrame

DataFrame containing columns for all selected outputs

Notes

If exog, endog and data are all None, in-sample predictions (fitted values) will be returned.

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-process data, or using data which will be processed using the formula used to construct the values corresponding to the original model specification.

Return type

DataFrame