- CountModel.predict(params, exog=None, exposure=None, offset=None, which='mean', linear=None)¶
Predict response variable of a count model given exogenous variables
Design / exogenous data. Is exog is None, model exog is used.
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. If not, uses 0 as the default value.
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. If not, uses 0 as the default value.
- which‘mean’, ‘linear’, ‘var’, ‘prob’ (
Statitistic to predict. Default is ‘mean’.
‘mean’ returns the conditional expectation of endog E(y | x), i.e. exp of linear predictor.
‘linear’ returns the linear predictor of the mean function.
linear` keyword is deprecated and will be removed, use ``whichkeyword instead. If True, returns the linear predicted values. If False or None, then the statistic specified by
whichwill be returned.
If exposure is specified, then it will be logged by the method. The user does not need to log it first.