Skip to contents

A dataset of 120 simulated soil samples in which the properties are related to one another the way real soil properties are. It exists because soil_data does not: it draws every property independently, so it carries almost no covariance and cannot exercise any method that works on the relationships between indicators.

Usage

soil_structured

Format

A data frame with 120 rows and 16 columns:

SampleID

Character. Unique identifier (STR001-STR120)

Sand

Numeric. Sand content (%)

Silt

Numeric. Silt content (%)

Clay

Numeric. Clay content (%)

BD

Numeric. Bulk density (g/cm3)

pH

Numeric. Soil pH in water

OM

Numeric. Organic matter (%)

SOC

Numeric. Soil organic carbon (%)

N

Numeric. Total nitrogen (%)

P

Numeric. Available phosphorus (mg/kg)

K

Numeric. Exchangeable potassium (mg/kg)

CEC

Numeric. Cation exchange capacity (cmol/kg)

Ca

Numeric. Exchangeable calcium (cmol/kg)

Mg

Numeric. Exchangeable magnesium (cmol/kg)

S

Numeric. Sulfur (mg/kg)

EC

Numeric. Electrical conductivity (dS/m)

Source

Simulated. The generating script is data-raw/create_soil_structured.R, which states every relationship and coefficient used.

Details

The values are simulated, but from three latent gradients – texture, organic status and base status – so that the standard pedological relationships hold rather than being absent:

  • Sand + Silt + Clay = 100 exactly (compositional closure)

  • SOC = OM / 1.724 (van Bemmelen factor), giving \(\rho \approx 0.99\)

  • N = SOC / (C:N) with a C:N ratio near 11

  • CEC generated by clay surfaces and organic colloids together, which makes it the hub of the correlation network

  • Ca and Mg occupying exchange sites, so both track CEC and pH

  • BD falling with organic matter and rising with sand (\(\rho \approx -0.85\) against OM)

  • EC carried by soluble bases

Forty pairs of indicators reach \(|\rho| \ge 0.6\), against one in soil_data.

What it is useful for. Any method that reads the structure between indicators: na_select_mds, mds_consensus, and redundancy screening. It also separates the two selection routes cleanly, in a way that is worth seeing before choosing one:

  • na_select_mds selects OM and CEC – the hubs.

  • pca_select_mds selects pH and Silt – high-variance and, in Silt's case, nearly uncorrelated with anything.

  • Their consensus is empty. That is not a defect in either method; it is the asymmetry the two documents warn about, made visible. PCA rewards variance and uniqueness, network analysis rewards centrality.

The base-status module (pH, Ca, Mg, EC) is internally coherent but peripheral to the network, so the centrality filter discards it – an illustration of why selecting within functional groups, rather than across the whole pool, is worth doing.

See also

soil_data, which is simpler but carries no covariance structure

Examples

data(soil_structured)

# The relationships real soil data has, which soil_data lacks
round(cor(soil_structured$OM, soil_structured$SOC, method = "spearman"), 3)
#> [1] 0.991
round(cor(soil_structured$OM, soil_structured$BD, method = "spearman"), 3)
#> [1] -0.839

# Texture is compositional
range(soil_structured$Sand + soil_structured$Silt + soil_structured$Clay)
#> [1] 100 100

# \donttest{
if (requireNamespace("igraph", quietly = TRUE)) {
  props <- setdiff(names(soil_structured), "SampleID")
  agreement <- mds_consensus(soil_structured[, props])
  agreement$network$mds
  agreement$pca$mds
}
#> Warning: The two selection routes share no indicators. This is not an error, but it means variance-based and centrality-based selection disagree completely on this data set; inspect both results before relying on either.
#> [1] "pH"   "Silt"
# }