- ZeroInflatedPoisson.predict(params, exog=None, exog_infl=None, exposure=None, offset=None, which='mean', y_values=None)¶
Predict expected response or other statistic given exogenous variables.
The parameters of the model.
Explanatory variables for the main count model. If
exogis None, then the data from the model will be used.
Explanatory variables for the zero-inflation model.
exog_inflhas to be provided if
exogwas provided unless
exog_inflin the model is only a constant.
Offset is added to the linear predictor of the mean function with coefficient equal to 1. Default is zero if exog is not None, and the model offset if exog is None.
Log(exposure) is added to the linear predictor with coefficient equal to 1. If exposure is specified, then it will be logged by the method. The user does not need to log it first. Default is one if exog is is not None, and it is the model exposure if exog is None.
Statitistic to predict. Default is ‘mean’.
‘mean’ : the conditional expectation of endog E(y | x). This takes inflated zeros into account.
‘linear’ : the linear predictor of the mean function.
‘var’ : returns the estimated variance of endog implied by the model.
‘mean-main’ : mean of the main count model
- ‘prob-main’probability of selecting the main model.
The probability of zero inflation is
1 - prob-main.
‘mean-nonzero’ : expected value conditional on having observation larger than zero, E(y | X, y>0)
‘prob-zero’ : probability of observing a zero count. P(y=0 | x)
‘prob’ : probabilities of each count from 0 to max(endog), or for y_values if those are provided. This is a multivariate return (2-dim when predicting for several observations).
Values of the random variable endog at which pmf is evaluated. Only used if