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
- exogarray_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.
- fittedbool
Flag indicating whether to include the fitted values
- effectsbool
Flag indicating whether to include estimated effects
- idiosyncraticbool
Flag indicating whether to include the estimated idiosyncratic shock
- missingbool
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
DataFrame containing columns for all selected output
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.
- Return type