Skip to contents

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, ...)

Arguments

x

A kb_fit object.

...

Unused.

Value

The input data with added columns fitted (response-scale fitted value) and residual (deviance residual).

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