Skip to contents

Prints the results of a Moran's I test on the residuals of a model.

Usage

print_moran(
  model,
  caption = NULL,
  verbose = TRUE
)

Arguments

model

A model fitted with rf(), rf_repeat(), or rf_spatial().

caption

Character, caption of the output table, Default: NULL

verbose

Logical, if TRUE, the resulting table is printed into the console, Default: TRUE

Value

Prints a table in the console using the huxtable package.

Examples


data(plants_rf)

print_moran(plants_rf)
#>              ┌──────────┬───────────┬─────────┬──────────────────┐
#>DistanceMoran's IP valueInterpretation  
#>              ├──────────┼───────────┼─────────┼──────────────────┤
#>              │    100.0 │     0.164 │   0.000 │ Positive spatial │
#>              │          │           │         │ correlation      │
#>              ├──────────┼───────────┼─────────┼──────────────────┤
#>              │   1000.0 │     0.073 │   0.000 │ Positive spatial │
#>              │          │           │         │ correlation      │
#>              ├──────────┼───────────┼─────────┼──────────────────┤
#>              │   2000.0 │     0.026 │   0.002 │ Positive spatial │
#>              │          │           │         │ correlation      │
#>              ├──────────┼───────────┼─────────┼──────────────────┤
#>              │   4000.0 │     0.008 │   0.032 │ Positive spatial │
#>              │          │           │         │ correlation      │
#>              └──────────┴───────────┴─────────┴──────────────────┘