Computes the variance of each regression coefficient across perturbation iterations. Lower variance indicates greater stability.
Arguments
- diag_obj
A
reprostatobject fromrun_diagnostics.
Examples
set.seed(1)
d <- run_diagnostics(mpg ~ wt + hp, data = mtcars, B = 50)
coef_stability(d)
#> (Intercept) wt hp
#> 3.512876e+00 3.919577e-01 4.783342e-05