Provides basic quantities which are used in forming a wide variety of diagnostics for checking the quality of fitted model objects.
A fitted model object from splm(), spautor(), spglm(), or spgautor().
Other arguments. Not used (needed for generic consistency).
A tibble with residuals (.resid), leverage values (.hat),
cook's distance (.cooksd), and standardized residuals (.std.resid).
This function calls residuals.spmodel(), hatvalues.spmodel(),
and cooks.distance.spmodel() and puts the results into a tibble. It is
primarily used when calling augment.spmodel().
spmod <- splm(z ~ water + tarp,
data = caribou,
spcov_type = "exponential", xcoord = x, ycoord = y
)
influence(spmod)
#> # A tibble: 30 × 4
#> .resid .hat .cooksd .std.resid
#> <dbl> <dbl> <dbl> <dbl>
#> 1 0.454 0.116 0.209 2.52
#> 2 0.190 0.137 0.0465 1.08
#> 3 -0.237 0.137 0.0756 -1.38
#> 4 -0.0842 0.174 0.00213 -0.201
#> 5 0.0402 0.153 0.0158 0.591
#> 6 0.177 0.148 0.0431 0.998
#> 7 0.0508 0.156 0.00922 0.447
#> 8 -0.163 0.122 0.0134 -0.623
#> 9 -0.290 0.119 0.0642 -1.38
#> 10 0.0521 0.131 0.0265 0.837
#> # ℹ 20 more rows