add_probs.negbin: Response Probabilities for Negative Binomial Models
Description
This is the method add_probs uses if the model fit is an
object of class negbin. Probabilities are determined through
simulation, using the same method as add_pi.negbin.
Usage
# S3 method for negbin
add_probs(
df,
fit,
q,
name = NULL,
yhatName = "pred",
comparison = "
Arguments
df
A data frame of new data.
fit
An object of class negbin. Predictions are made
with this object.
q
A double. A quantile of the response distribution.
name
NULL or a string. If NULL, probabilities
automatically will be named by add_probs(), otherwise,
the probabilities will be named name in the returned
data frame.
yhatName
A string. Name of the vector of predictions.
comparison
A character vector of length one. Permitted
arguments are "=", "<", "<=", ">", or
">=". The default value is "<".
nSims
A positive integer. Controls the number of simulated
draws.
...
Additional arguments.
Value
A dataframe, df, with predicted values and
probabilities attached.
See Also
add_ci.negbin for confidence intervals for
negbin objects, add_pi.negbin for prediction
intervals of negbin objects, and
add_quantile.negbin for response quantiles of
negbin objects.