statsmodels.discrete.discrete_model.CountModel.predict¶
-
CountModel.
predict
(params, exog=None, exposure=None, offset=None, linear=False)[source]¶ Predict response variable of a count model given exogenous variables
- Parameters
- paramsarray_like
Model parameters
- exogarray_like,
optional
Design / exogenous data. Is 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. If not, uses 0 as the default value.
- 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. If not, uses 0 as the default value.
- linearbool
If True, returns the linear predicted values. If False, returns the exponential of the linear predicted value.
Notes
If exposure is specified, then it will be logged by the method. The user does not need to log it first.