sqi_compare: Compare All SQI Methods

View source: R/indexing.R

sqi_compareR Documentation

Compare All SQI Methods

Description

Runs all six SQI methods (sqi_linear, sqi_regression, sqi_pca, sqi_fuzzy, sqi_entropy, sqi_topsis) on the same scored dataset and returns a combined results table for method comparison.

Usage

sqi_compare(scored, config, group_cols = "LandUse", dep_var = NULL, mds = NULL)

Arguments

scored

A scored data frame from score_all.

config

A sqi_config object.

group_cols

Character vector of grouping column names.

dep_var

Character. Dependent variable for sqi_regression. If NULL, the regression method is skipped.

mds

Object from select_mds, or NULL to compute automatically.

Value

A data frame with one row per group and columns for each SQI method. Also includes Mean_SQI and Rank columns.

Examples

data(soil_data)
cfg <- make_config(
  variable = c("pH","EC","BD","OC","MBC","Clay"),
  type     = c("opt","less","less","more","more","opt"),
  opt_low  = c(6.0, NA, NA, NA, NA, 20),
  opt_high = c(7.0, NA, NA, NA, NA, 35)
)
scored  <- score_all(soil_data, cfg, group_cols = c("LandUse","Depth"))
results <- sqi_compare(scored, cfg, group_cols = c("LandUse","Depth"),
                        dep_var = "OC")
print(results)


SQIpro documentation built on April 20, 2026, 5:06 p.m.