vgm_compare.RdCompute the similarity between two variogram models based on the area under their curves (AUC) up to a specified maximum distance.
vgm_compare(model1, model2, maxdist = NULL, n = 101)A variogram model as a data.frame with columns 'model' and 'psill',
typically obtained from gstat::vgm or gstat::fit.variogram.
A variogram model as a data.frame with columns 'model' and 'psill',
typically obtained from gstat::vgm or gstat::fit.variogram.
Maximum distance to consider for the variogram; if NULL, it will be inferred from the model.
Number of points to use for numerical integration; must be odd (default is 101).
A numeric value between 0 and 1 representing the similarity of the two variogram models
Poggio, L., Lassauce, A., & Gimona, A. (2019). Modelling the extent of northern peat soil and its uncertainty with sentinel: Scotland as example of highly cloudy region. Geoderma, 346, 63-74.
vgm_model1 = data.frame(model = c("Nug", "Sph"), psill = c(0.5, 1.5), range = c(0, 100))
vgm_model2 = data.frame(model = c("Nug", "Exp"), psill = c(0.7, 1.3), range = c(0, 120))
similarity = vgm_compare(vgm_model1, vgm_model2)
similarity
#> [1] 0.7862001