Append the fitted() and deviance residuals() values
to the input data. Values are the point estimate (median) of the posterior distributions.
Usage
# S3 method for class 'kb_fit'
augment(x, ...)Value
The input data with added columns fitted (response-scale fitted
value) and residual (deviance residual).
See also
fitted() and residuals().
Other generics:
coef.kb_fit(),
converged.kb_fit(),
fitted.kb_fit_weight(),
glance.kb_fit(),
kb_stancode(),
log_lik.kb_fit(),
posterior_epred.kb_fit_weight(),
posterior_linpred.kb_fit_weight(),
posterior_predict.kb_fit_weight(),
predict.kb_fit_weight(),
prior_summary.kb_fit(),
residuals.kb_fit_weight(),
samples(),
summary.kb_fit(),
tidy.kb_fit_weight()
Examples
augment(fit_weight_sim_nereo)
#> # A tibble: 234 × 6
#> diameter weight site year fitted residual
#> <dbl> <dbl> <fct> <fct> <dbl> <dbl>
#> 1 53.8 0.412 site1 2019 0.427 -0.242
#> 2 38.2 0.183 site1 2019 0.173 0.378
#> 3 25.2 0.059 site1 2019 0.0595 -0.0540
#> 4 54.5 0.523 site1 2019 0.442 1.11
#> 5 25.6 0.06 site1 2019 0.0619 -0.212
#> 6 49.5 0.411 site1 2019 0.342 1.19
#> 7 63.7 0.693 site2 2019 0.672 0.199
#> 8 32.6 0.144 site2 2019 0.132 0.582
#> 9 44.5 0.166 site2 2019 0.279 -2.53
#> 10 58 0.457 site2 2019 0.534 -1.02
#> # ℹ 224 more rows
