statsmodels.discrete.count_model.ZeroInflatedGeneralizedPoissonResults.get_prediction#
- ZeroInflatedGeneralizedPoissonResults.get_prediction(exog=None, exog_infl=None, exposure=None, offset=None, which='mean', average=False, agg_weights=None, y_values=None, transform=True, row_labels=None)#
Compute prediction results for zero-inflated model.
- Parameters:
- exogarray_like,
optional The values for which you want to predict.
- exog_inflarray_like,
optional Explanatory variables for the zero-inflation model.
- exposurearray_like,
optional Log(exposure) is added to the linear predictor of the mean function with coefficient equal to 1.
- offsetarray_like,
optional Offset is added to the linear predictor of the mean function with coefficient equal to 1.
- which
str,optional Which statistic is to be predicted. Default is “mean”. The available statistics and options depend on the model. See the model.predict docstring.
- averagebool,
optional If average is True, then the mean prediction is computed, that is, predictions are computed for individual exog and then the average over observation is used. If average is False, then the results are the predictions for all observations, i.e., same length as
exog.- agg_weights
ndarray,optional Aggregation weights, only used if average is True. The weights are not normalized.
- y_valuesarray_like,
optional Values of the random variable endog at which pmf is evaluated. Only used if
which="prob".- transformbool,
optional If the model was fit via a formula, do you want to pass exog through the formula. Default is True. E.g., if you fit a model y ~ log(x1) + log(x2), and transform is True, then you can pass a data structure that contains x1 and x2 in their original form. Otherwise, you’d need to log the data first.
- row_labels
listofstr,optional If row_labels are provided, then they will replace the generated labels.
- exogarray_like,
- Returns:
PredictionResultsDeltaThe prediction results instance contains prediction and prediction variance and can on demand calculate confidence intervals and summary tables for the prediction of the mean and of new observations.