statsmodels.discrete.discrete_model.PoissonResults.predict_prob#

PoissonResults.predict_prob(n=None, exog=None, exposure=None, offset=None, transform=True)[source]#

Return predicted probability of each count level for each observation

Parameters:
narray_like or int

The counts for which you want the probabilities. If n is None then the probabilities for each count from 0 to max(y) are given.

exogarray_like, optional

Design / exogenous data. If exog is None, model exog is used.

exposurearray_like, optional

Log(exposure) is added to the linear prediction with coefficient equal to 1. If exposure is not provided and exog is None, uses the model’s exposure if present.

offsetarray_like, optional

Offset is added to the linear prediction with coefficient equal to 1. If offset is not provided and exog is None, uses the model’s offset if present.

transformbool, optional

If the model was fit via a formula, do you want to pass exog through the formula. Default is True.

Returns:
ndarray

A nobs x n array where len(n) columns are indexed by the count n. If n is None, then column 0 is the probability that each observation is 0, column 1 is the probability that each observation is 1, etc.