You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

STFDF结构时空数据:如何生成可识别Nugget、Sill、Range的Variogram plot

How to Generate Spatio-Temporal Variogram Plots for Identifying Nugget, Sill, and Range

The default plots you’re using (plot(vario, map=FALSE) or wireframe) show combined spatio-temporal relationships, which are great for exploring overall patterns but not for isolating the key variogram parameters. To identify nugget, sill, and range, you need to focus on pure spatial (fixed time lag = 0) or pure temporal (fixed spatial lag = 0) variogram profiles—these mirror the classic 2D variogram format we use for spatial-only data.

Step 1: Extract Target Variogram Profiles

First, filter your STVariogram object to isolate either spatial or temporal lags:

Pure Spatial Variogram (Time Lag = 0)

This shows how semivariance changes with spatial distance when there’s no time difference between observations:

# Filter to keep only pairs with zero time lag
spatial_only <- vario[vario$time.lag == 0, ]

# Plot the raw semivariance points
plot(spatial_only$dist, spatial_only$gamma, 
     xlab = "Spatial Lag (distance)", 
     ylab = "Semivariance",
     main = "Pure Spatial Variogram",
     pch = 16, col = "steelblue")

Pure Temporal Variogram (Spatial Lag = 0)

This shows semivariance changes over time for observations at the same spatial location:

# Filter to keep only pairs with zero spatial lag
temporal_only <- vario[vario$dist == 0, ]

# Plot the raw semivariance points
plot(temporal_only$time.lag, temporal_only$gamma, 
     xlab = "Temporal Lag (time units)", 
     ylab = "Semivariance",
     main = "Pure Temporal Variogram",
     pch = 16, col = "darkorange")

To make parameter identification even clearer, fit a theoretical variogram model to your filtered data using fit.variogramST from the gstat package:

Example for Spatial Profile

# Define a theoretical spatial model (e.g., spherical)
spatial_model <- vgmST("separable", 
                       spatial = vgm(psill = 1, model = "Sph", range = 100, nugget = 0.2))

# Fit the model to your pure spatial data
spatial_fit <- fit.variogramST(spatial_only, model = spatial_model)

# Add the fitted line to your plot
lines(spatial_fit, col = "red", lwd = 2)

Step 3: Identify the Parameters

Once you have the 2D plot (raw points + fitted line), you can easily spot the three key values:

  • Nugget: The semivariance value when the lag distance is 0 (y-intercept of the fitted model). This represents measurement error or micro-scale variation.
  • Sill: The plateau value where the semivariance stops increasing (the maximum y-value the model reaches). This equals the total variance of your data minus the nugget.
  • Range: The lag distance where the semivariance reaches ~95% of the sill (for spherical models) or ~63% (for exponential models). Beyond this distance, observations are no longer spatially/temporally correlated.

Alternative: Direct Plotting with which Parameter

You can also use the built-in plot method for STVariogram objects and specify the which argument to focus on specific profiles:

# Plot only the pure spatial variogram
plot(vario, which = "spatial", main = "Pure Spatial Variogram")

# Plot only the pure temporal variogram
plot(vario, which = "temporal", main = "Pure Temporal Variogram")

This generates clean 2D plots that let you directly read off nugget, sill, and range just like you would with a standard spatial variogram.

内容的提问来源于stack exchange,提问作者Reta

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 07:26:47