| sqi_compare | R Documentation |
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.
sqi_compare(scored, config, group_cols = "LandUse", dep_var = NULL, mds = NULL)
scored |
A scored data frame from |
config |
A |
group_cols |
Character vector of grouping column names. |
dep_var |
Character. Dependent variable for |
mds |
Object from |
A data frame with one row per group and columns for each SQI
method. Also includes Mean_SQI and Rank columns.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.