linearmodels.panel.results.RandomEffectsResults.predict

RandomEffectsResults.predict(exog=None, *, data=None, fitted=True, effects=False, idiosyncratic=False, missing=False)

In- and out-of-sample predictions

Parameters:
exog : array_like

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

data : DataFrame

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

fitted : bool

Flag indicating whether to include the fitted values

effects : bool

Flag indicating whether to include estimated effects

idiosyncratic : bool

Flag indicating whether to include the estimated idiosyncratic shock

missing : bool

Flag indicating to adjust for dropped observations. if True, the values returns will have the same size as the original input data before filtering missing values

Returns:

DataFrame containing columns for all selected output

Return type:

DataFrame

Notes

data can only be used when the model was created using the formula interface. exog can be used for both a model created using a formula or a model specified with dependent and exog arrays.

When using exog to generate out-of-sample predictions, the variable order must match the variables in the original model.

Idiosyncratic errors and effects are not available for out-of-sample predictions.