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).
In the empirical semivariogram model I specify initial values for the nugget and all other parameters. Then the optimal value is found by using the fit.variogram() function, which returns a value of 0 for the spatial, temporal, and joint spatio-temporal nugget. Do you think the problem comes from here? Why would a nugget of 0 cause that?
In general I am not trying to predict over a spatial grid, rather I am trying to predict on the same observations I use to develop the variogram. The reason why I need to do this, it to fill out several NA values in my spatiotemporal dataset. The way I do the estimation, after choosing the variogram model, is by cross-validation, hence I predict the spatio-temporal values at a given monitoring stations, using a certain number of neighbors from that station. Pretty much I am estimating the value on 1 station at a time, given a number of neighbors.
I tried to aggregate my values to daily max,min,mean temperature and I do not get that error anymore. In that case my estimated nuggets are not 0, aside from the joint space-time nugget.