R Error in chol.default(A) krigeST from gstat package

746 Views Asked by At

I am working with an hourly dataset of air temperature, recorded at ~200 stations over a relatively small area. I chose a space-time variogram (e.g. sum-metric) to fit my data and am now trying to make predictions over my same stations in order to fill NA (missing value) gaps. When using the krigeST() function over daily aggregated data everything seems to go smooth but when I use it at the original hourly resolution I always get the following error:

Error in chol.default(A)
the leading minor of order 68 is not positive definite

I googled it and found that it is related to a matrix not being completely positive-definite. However, I am not sure why this happens and was wondering if any of you know a way of fixing this (a workaround to avoid it).

1

There are 1 best solutions below

0
On

There are several possibilities that lead to a singular covariance matrix. Two common ones:

  1. duplicate observations (identical location & time stamp),
  2. a variogram model that does not discriminate observations sufficiently, leading to near-perfectly correlated observations.