Session Ready
Exercise

Variogram with spatial trend

You might imagine that if soil at a particular point is alkaline, then soil one metre away is likely to be alkaline too. But can you say the same thing about soil one kilometre away, or ten kilometres, or one hundred kilometres?

The shape of the previous variogram tells you there is a large-scale trend in the data. You can fit a variogram considering this trend with gstat. This variogram should flatten out, indicating there is no more spatial correlation after a certain distance with the trend taken into account.

Instructions
100 XP

The acidity survey data, ca_geo and the missing value index, miss have been pre-defined.

  • Set the formula for the variogram so that the pH value depends on the coordinates.