| sqi_pca | R Documentation |
Computes SQI using Principal Component Analysis, weighting selected MDS variables by the proportion of variance their component explains. This is the most widely cited data-driven approach in soil quality research (Andrews et al., 2004; Bastida et al., 2008).
SQI_{PCA} = \sum_{k=1}^{m} \frac{V_k}{\sum V} \bar{S}_{g, j_k}
where V_k is the variance explained by component k,
j_k is the MDS variable selected from component k, and
\bar{S}_{g, j_k} is the group mean score of that variable.
sqi_pca(scored, config, group_cols = "LandUse", mds = NULL)
scored |
A scored data frame from |
config |
A |
group_cols |
Character vector of grouping column names. |
mds |
Object returned by |
A data frame with group columns and SQI_pca (0–1).
Andrews, S.S., Karlen, D.L., & Cambardella, C.A. (2004). The soil management assessment framework. Soil Science Society of America Journal, 68(6), 1945–1962. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2136/sssaj2004.1945")}
Bastida, F., Zsolnay, A., Hernandez, T., & Garcia, C. (2008). Past, present and future of soil quality indices: A biological perspective. Geoderma, 147(3–4), 159–171. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.geoderma.2008.08.007")}
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_pca(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.