| sqi_topsis | R Documentation |
Computes SQI using the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS), a multi-criteria decision analysis method. Each group is ranked by its Euclidean distance to the positive ideal solution (all scores = 1) and negative ideal solution (all scores = 0).
C_i^* = \frac{d_i^-}{d_i^+ + d_i^-}
where d_i^+ and d_i^- are distances to the positive and
negative ideal solutions. C_i^* \in [0, 1] with higher values
indicating better soil quality.
sqi_topsis(
scored,
config,
group_cols = "LandUse",
mds_vars = NULL,
weights = NULL
)
scored |
A scored data frame from |
config |
A |
group_cols |
Character vector of grouping column names. |
mds_vars |
Character vector of MDS variable names. |
weights |
Named numeric vector of criteria weights. Defaults to equal weights. |
A data frame with group columns and SQI_topsis (0–1).
Hwang, C.L., & Yoon, K. (1981). Multiple Attribute Decision Making: Methods and Applications. Springer, Berlin. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/978-3-642-48318-9")}
Yoon, K. (1987). A reconciliation among discrete compromise solutions. Journal of the Operational Research Society, 38, 277–286. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1057/jors.1987.44")}
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"))
result <- sqi_topsis(scored, cfg, group_cols = c("LandUse","Depth"))
print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.