augment.mixpoissonreg {mixpoissonreg} | R Documentation |
Augment data with information from a mixpoissonreg
object
Description
Augment accepts a model object and a dataset and adds information about each observation in the dataset. It includes
predicted values in the .fitted
column, residuals in the .resid
column, and standard errors for the fitted values in a .se.fit
column, if
the type of prediction is 'link'. New columns always begin with a . prefix to avoid overwriting columns in the original dataset.
Usage
## S3 method for class 'mixpoissonreg'
augment(
x,
data = stats::model.frame(x),
newdata = NULL,
type.predict = c("response", "link", "precision", "variance"),
type.residuals = c("pearson", "score"),
se_fit = FALSE,
conf_int = TRUE,
pred_int = FALSE,
...
)
Arguments
x |
A |
data |
A |
newdata |
A |
type.predict |
Type of prediction. The options are 'response', 'link', 'precision' and 'variance'. The default is "response". |
type.residuals |
Type of residuals. The options are 'pearson' and 'score'. The default is 'pearson'. |
se_fit |
Logical indicating whether or not a .se.fit column should be added to the augmented output. If TRUE, it only returns a non-NA value if type of prediction is 'link'. |
conf_int |
Logical indicating whether or not confidence intervals for the fitted variable with type chosen from type.predict should be built. The available type options are 'response' and 'link'. |
pred_int |
Logical indicating whether or not prediction intervals for future observations should be built. It only works with type.predict = 'response'. The arguments
|
... |
Additional arguments. Possible additional arguments are |
Value
A tibble::tibble()
with columns:
-
.cooksd
Cook's distance. -
.fitted
Fitted or predicted value. -
.fittedlwrconf
Lower bound of the confidence interval, if conf_int = TRUE -
.fitteduprconf
Upper bound of the confidence interval, if conf_int = TRUE -
.fittedlwrpred
Lower bound of the prediction interval, if pred_int = TRUE -
.fitteduprpred
Upper bound of the prediction interval, if pred_int = TRUE -
.hat
Diagonal of the hat matrix. -
.resid
The chosen residual. -
.resfit
The chosen residual of the fitted object. -
.se.fit
Standard errors of fitted values, if se_fit = TRUE. -
.gencooksd
Generalized Cook's distance. -
.lwrenv
Lower bound of the simulated envelope, if the fittedmixpoissonreg
object, was fitted with envelopes > 0. -
.mdnenv
Median of the simulated envelope, if the fittedmixpoissonreg
object, was fitted with envelopes > 0. -
.uprenv
Upper bound of the simulated envelope, if the fittedmixpoissonreg
object, was fitted with envelopes > 0.
See Also
glance.mixpoissonreg
, tidy.mixpoissonreg
, tidy_local_influence.mixpoissonreg
,
autoplot.mixpoissonreg
, local_influence_autoplot.mixpoissonreg