predict.truncmodel: Predicted Expected Response for One-Inflated or Truncated Models
Description
Calculates the predicted expected response for a model fitted using
oneinfl or truncreg.
Usage
# S3 method for truncmodel
predict(object, ...)
Value
A numeric vector of predicted expected responses for the observations in df.
Arguments
object
An object of class `truncmodel`
...
Additional argument `df`, a data frame used to calculate the expected
value of the response variable.
Details
This function computes the expected response based on the fitted model. The computation
differs depending on the distribution. For Poisson (PP), predicted values are computed
using E_pois_noinfl. For Negative Binomial (ZTNB), predicted values are
computed using E_negbin_noinfl.
See Also
oneinfl for fitting one-inflated models.
truncreg for fitting truncated models.
E_pois_noinfl, E_negbin_noinfl for the expected value calculations.