Computes the area under the curve (AUC) of a variogram model using Simpson's rule.

vgm_auc(model, maxdist = NULL, n = 101)

Arguments

model

A variogram model, either as a gstat model object or a data.frame with 'dist' and 'gamma' columns.

maxdist

Maximum distance to consider for the variogram; if NULL, it will be inferred from the model.

n

Number of points to use for numerical integration; must be odd (default is 101).

Value

A numeric value representing the AUC of the variogram model.

References

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.

Examples

vgm_model = data.frame(model = c("Nug", "Sph"), psill = c(0.5, 1.5), range = c(0, 100))
auc_value = vgm_auc(vgm_model)
auc_value
#> [1] 243.75