Inverse Distance Weighting method (IDW)

\[\hat{Z}(s_0) = \sum_{i = 1}^{n}(Z(s_i) \cdot w_i)\]

\[w_i = d_i^{-\beta} / \sum_{i = 1}^{n}d_i^{-\beta}\]

idw <- gstat(
  formula = vble ~ 1, 
  data = d2, 
  locations = ~ x + y, 
  set = list(idp = 1)
)