| get_moran | R Documentation |
Extracts Moran's I test results for spatial autocorrelation in model residuals from models fitted with rf(), rf_repeat(), or rf_spatial().
get_moran(model)
model |
Model object from |
Moran's I tests for spatial autocorrelation in model residuals. Significant positive values indicate residuals are spatially clustered, suggesting the model hasn't fully captured spatial patterns. For spatial models (rf_spatial()), low or non-significant Moran's I values indicate successful removal of spatial autocorrelation.
Data frame with Moran's I statistics at multiple distance thresholds. Columns include distance.threshold, moran.i (statistic), p.value, interpretation, and method.
moran(), moran_multithreshold(), plot_moran(), print_moran()
Other model_info:
get_evaluation(),
get_importance(),
get_importance_local(),
get_performance(),
get_predictions(),
get_residuals(),
get_response_curves(),
get_spatial_predictors(),
print.rf(),
print_evaluation(),
print_importance(),
print_moran(),
print_performance()
data(plants_rf)
# Extract Moran's I test results
moran_results <- get_moran(plants_rf)
moran_results
# Check for significant spatial autocorrelation
significant <- moran_results[moran_results$p.value < 0.05, ]
significant
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.