Hot answers tagged

17 votes
Accepted

R gstat krige() - Covariance matrix singular at location [5.88,47.4,0]: skipping

This error is commonly returned because you have duplicate locations. You can check this using the sp::zerodist function. To remove duplicate locations you call sp::zerodist within a bracket index. ...
Jeffrey Evans's user avatar
10 votes
Accepted

Performing Kriging in QGIS

The great thing about QGIS is its modular design, based on which you can use the geoprocessing engines of various other systems directly as tools in QGIS (GRASS, SAGA, GDAL, OGR, ...). In order to do ...
Jochen Schwarze's user avatar
10 votes

R 'gstat - Warning: singular model in variogram fit

Some has already been said by Spacedman in the comments. This warning may not pose a problem, if the variogram looks good. A good option might be to initialize some of the variogram parameters in vgm(&...
Janina's user avatar
  • 708
7 votes
Accepted

Backtransformation of kriging predictions and variances

When the prediction error of a model based on log(Y) is Gaussian like here, you normally should use the correction of Laurent (1963) to estimate back to the original scale. In your case: MeanY = exp(a$...
Sébastien Rochette's user avatar
7 votes
Accepted

How to calculate kriging weights?

Is it true that we're just using a different set of weight values than the 1/distance in IDW? Yes, both IDW interpolation and Ordinary Kriging (OK) will calculate weights based on distance, but with ...
Andre Silva's user avatar
  • 10.2k
7 votes

Kriging example with sf object

After the study of https://rpubs.com/nabilabd/118172 and https://rpubs.com/nabilabd/134781 I assembled the following solution. library(sf) library(sp) library(gstat) library(tidyverse) Here are ...
Jacek Kotowski's user avatar
5 votes

Understanding regression function output in ArcGIS Kriging?

You are correct about value you referred to, the residuals: An excerpt from Esri's Regression analysis basics Residuals: These are the unexplained portion of the dependent variable, represented in ...
whyzar's user avatar
  • 12k
5 votes
Accepted

Variogram model - SAGA on QGIS Processing

Finally, I found this template in SAGA GUI (2.0.1), in the interactive mode of Ordinary Kriging (global). So a Spherical model can be like: And I got this; [Note] If anybody kindly volunteer to ...
Kazuhito's user avatar
  • 30.7k
5 votes
Accepted

Error in In predict.gstat in R

As I pointed out, you had identical observations. Additionally, you were not using the "resolution" argument in the raster function so, were only creating 100 pixel observations to predict to. I had ...
Jeffrey Evans's user avatar
5 votes
Accepted

Creating SpatialPolygons in R

You are confusing terms and thus, confusing us. The expected input for kriging prediction in the gstat krige function is a systematic array of points and not polygons. It would also be nice if you ...
Jeffrey Evans's user avatar
5 votes

Using kriging to extrapolate values outside of sampling polygon in ArcMap?

Following a bit on what Jeffrey Evans said, you must remember that your data points define an area that's called convex hull. It is the (convex) polygon of minimum area that contains your data points. ...
Carlos Grohmann's user avatar
5 votes

Backtransformation of kriging predictions and variances

A common misconception is that kriging estimates may be simply exponentiated to recover the field values. Sebastien Rochette's suggests a back-transformation for field values y following Laurent (...
Rich Pauloo's user avatar
5 votes

How to achieve parallel Kriging in R to speed up the process?

This is a simple and reproducible example with meuse dataset of gstat package based on @Spacedman answer and using the parallel package: More info and help here: Parallelizing and clustering in R # ...
Guz's user avatar
  • 3,166
5 votes

How to calculate kriging weights?

Maybe I should begin by stating that "the summit issue is reflecting how IDW models the surface, rather than weighting". IDW sees the predicted surface as an averaging model, while Spline tries to ...
Kazuhito's user avatar
  • 30.7k
4 votes

Strange spatial interpolation results from ordinary kriging

You said you used "R" but R is not a geostatistical program, it is more like a programming language. However there are geostatistical "packages" in R, e.g. gstat. Which package did you use? Side ...
Donald Myers's user avatar
4 votes

Spatio-temporal kriging - useful if not interpolating to new time points?

CRAN package gstat comes with functions for spatio-temporal variogram modelling and prediction. The vignettes on this topic might be a good starting point. demo(localKrigeST) demonstrates ST kriging ...
Edzer Pebesma's user avatar
4 votes
Accepted

Gstat krige() error: Covariance matrix singular at location [917300,3.6109e+06,0]: skipping

This is caused by the matrix library used by gstat. Historically (gstat was released as open source code in 1997) it used the LDLfactor routine in the meschach library. Around 6 months ago I factored ...
Edzer Pebesma's user avatar
4 votes
Accepted

How to achieve parallel Kriging in R to speed up the process?

Once you've got a variogram fitted then kriging is trivially parallelizable. Kriging predictions are independent of each other. So, divide your prediction points (grid) into N sets, where N is your ...
Spacedman's user avatar
  • 63.2k
4 votes

Kriging using multiple spatial input variables and one spatial output (response) variable

There are two widely used packages to achieve Kriging interpolation and variogram model fitting in R, these are gstat and geoR. Depending on the package you use, you can build a native gstat object or ...
Guz's user avatar
  • 3,166
4 votes
Accepted

Kriging using multiple spatial input variables and one spatial output (response) variable

As I stated in the comments, you need values of your explanatory variables at the prediction locations in order to make predictions. Here is a fully reproducible example: library(automap) Make 100 ...
Spacedman's user avatar
  • 63.2k
4 votes
Accepted

R kriging cross validation returns NA for all prediction points?

The usual problem with kriging is duplicate locations. You can note that even the function autoKrige gives you the following warning: Removed 197 duplicate observation(s) in input_data You can also ...
Janina's user avatar
  • 708
4 votes
Accepted

Extracting the standard error map from autoKrige in R

The krige_output component of kr is a SpatialPixelsDataFrame. Plotting it only shows the first component. The components are: > names(kr$krige_output) [1] "var1.pred" "var1.var" "var1.stdev" ...
Spacedman's user avatar
  • 63.2k
4 votes
Accepted

Interpolating DEM using Kriging in R

Try this. It works by converting the raster out to a data frame of x,y,value columns, making a spatial points data frame, extracting the missing and non-missing points, fitting on the non-missing ...
Spacedman's user avatar
  • 63.2k
3 votes

Getting around no data places on Kriging in ArcGIS Desktop?

Assuming this is with just the standard "Kriging" tool of the Spatial Analyst, honestly, the tools in the Interpolation toolset of Spatial Analyst just don't cut it... They lack all kinds of vital ...
Marco_B's user avatar
  • 2,582
3 votes

Measuring error of Spatial Analyst interpolation such as spline, nearest neighbor and kriging?

Depending on the type of spline, it is most likely a special case of Radial Basis function interpolation but RDF is theoretically equivalent to one of the forms of kriging. With RBF you get an ...
Donald Myers's user avatar
3 votes

Ordinary kriging problem after exporting to raster (Geostatistical Wizard)

I think I know at which point the problem arises. I have to choose "Neighboorhood type - SMOOTH" in Geostatistical Wizard - Searching Neighborhood what is going to use a sigmoidal function defined by ...
xmisx's user avatar
  • 140
3 votes

Why is SAGA kriging slower in QGIS than in SAGA itself?

A lot depends on your desired grid size output. Kriging itself is generally a computationally expensive process due to the numerous calculations that take place. In qgis 2.18 I regularly use the ...
Dan B's user avatar
  • 128
3 votes
Accepted

Dealing with data which are not normally distributed when kriging?

Usually, it's not good practice to remove outliers, unless you know why they are outliers and have a good justification for the removal. For example, if you know these points were measured incorrectly ...
Andre Silva's user avatar
  • 10.2k
3 votes

Validity of ordinary kriging of polygon centroids

A key question is what "polygon based data" means? Does it mean the spatial average value, is it a count or a classification. In the case of a spatial average value it is already well known in the ...
Donald Myers's user avatar
3 votes

Interpolation of river pollution data

I would recommend the Indicator Kriging approach as well. Using indicator kriging to produce a probability or standard error of indicators map assumes an unknown constant mean. In addition, Indicator ...
whyzar's user avatar
  • 12k

Only top scored, non community-wiki answers of a minimum length are eligible