Provides basic quantities which are used in forming a wide variety of diagnostics for checking the quality of fitted model objects.

# S3 method for splm
influence(model, ...)

# S3 method for spautor
influence(model, ...)

# S3 method for spglm
influence(model, ...)

# S3 method for spgautor
influence(model, ...)

Arguments

model

A fitted model object from splm(), spautor(), spglm(), or spgautor().

...

Other arguments. Not used (needed for generic consistency).

Value

A tibble with residuals (.resid), leverage values (.hat), cook's distance (.cooksd), and standardized residuals (.std.resid).

Details

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

Examples

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.53 
#>  2  0.190  0.137 0.0468       1.09 
#>  3 -0.237  0.137 0.0752      -1.38 
#>  4 -0.0838 0.174 0.00211     -0.200
#>  5  0.0407 0.153 0.0159       0.594
#>  6  0.177  0.147 0.0434       1.00 
#>  7  0.0512 0.156 0.00936      0.450
#>  8 -0.163  0.122 0.0135      -0.624
#>  9 -0.290  0.119 0.0642      -1.38 
#> 10  0.0522 0.131 0.0264       0.837
#> # ℹ 20 more rows