Questions tagged [gstat]

gstat is an R package for spatial and spatio-temporal geostatistical modelling, prediction and simulation

130 questions
1
vote
1 answer

Can regression and IDW spatial interpolation be done in one model in R?

I do spatial modelling of variable T (temperature). I use what is commonly used in literature - perform regression (using variables like altitude etc.) and then spatially interpolate the residuals using IDW. R package gstat seems to have this…
Tomas
  • 57,621
  • 49
  • 238
  • 373
1
vote
1 answer

Issue with cross-validation using the automap package

I want to do a cross-validation for the ca20-Dataset from the geoR package. With for example the meuse-dataset, this works fine, but for this dataset, I encounter a strange problem with the dimensions of the …
P_M
  • 328
  • 1
  • 7
0
votes
0 answers

`Range` parameter Variogram

Why does the range parameter for this variogram differ so wildly? I have an estimated and fitted Generalized Least Squares variogram but the values are vastly different. #- extract the residuals into the point observations object cfaq.sf$res.ts2.gls…
arkriger
  • 207
  • 2
  • 7
0
votes
0 answers

Interpolation with RStudio. How to create Loop?

I have soil analysis data in an excell spreadsheet with coordinates, and a plot contour file in shp. I'm a beginner in R and I don't have enough knowledge to create a loop function that selects the data of interest and interpolates them. If…
0
votes
1 answer

Inverse Distance Weighting with gstat

I am attempting to execute an idw interpolation with gstat but am unable to. text…
arkriger
  • 207
  • 2
  • 7
0
votes
1 answer

Error in ST kriging of uneven spacetime data " the leading minor of order 2 is not positive definite"

I am trying to use universal kriging on some irregular data. I keep getting an error: Error in chol.default(A) : the leading minor of order 2 is not positive definite When I run the krigST command. Here is a sample of my…
Candy
  • 1
  • 4
0
votes
0 answers

gstat: simple vs. ordinary kriging

sorry for such a trivial question but I'm trying to find my way into the "kriging wild bush", a topic that is sometimes really confusing (at first); do you think my interpretation of the difference between simple (sk) vs. ordinary kriging (ok) and…
maxbre
  • 161
  • 9
0
votes
1 answer

Creating a semivariogram in R starting from a GeoTiff file

I'm trying to create a semivariogram in R, giving it data from a raster coming from a GeoTif file. The version of Rstudio I'm running is the "Elsbeth Geranium" Release (7d165dcf, 2022-12-03) for Windows and my OS is windows 10 home. The variogram…
MJHorst
  • 1
  • 3
0
votes
0 answers

Cross variogram negative : flip upside down

Using the "Cokriging" method, I first did a cross variogram. However, I had a negative relationship between my two variables taken, which led to the variogram crossed upside down. I was wondering if it was possible to overthrow it so that it would…
Vulraan
  • 1
  • 1
0
votes
1 answer

calculate R2, RMSE, and MAE for cv.krige (gstat) - R

The aim is to get the R2, RMSE, and MAE summaries for the cv.krige with leave-one-out cross validation. To illustrate I have the following code (please note that a random dataset is created and that metrics are poor): library(Metrics) library(nlme)…
0
votes
1 answer

Poly2nb - How to get rid of empty geometries in r

I have r code that I am using to compute Getis-ord Gstatistics. I typically create my shapefile in GIS, then import into r to use with the code. I recently needed to make an edit to my shapefile, which I did in GIS and imported into sas as…
CM93
  • 1
0
votes
1 answer

Kriging with gstat in R: Resulting object is blank with no interpolated values

I have kriged a dataset with the gstat package in R, but it has produced an empty variable as a result. I have 1,167 measurement points within a field, and I am trying to interpolate them across 3,464 interpolation points within the same field. How…
ihb
  • 292
  • 9
  • 27
0
votes
1 answer

Aggregate interpolated data at county level with R

The raw data is at the state level and I would like to go down to the county level. To do this, I first adjusted the data to county level and then interpolated it. The raw data on state level looks like this: object name "df.sf" Simple feature…
0
votes
1 answer

How to interpret semivariogram with range but no partial sill?

I have been using the variofit function in R's gstat package to fit semivariogram models to some spatial data I have, and I am confused by a couple of the models that have been generated. Basically for these few models, I will get a model that has a…
emc123
  • 33
  • 6
0
votes
1 answer

Kriging using the gstat and automap packages - problems when copying a tutorial

For several locations in my study site i have water depth (m) data, and i'm trying to use kriging to interpolate depth to locations for which i do not have data. I found a useful blog post written by Dr. Wilke here, and tried to apply his code to my…
FlyingDutch
  • 1,100
  • 2
  • 14
  • 24
1 2 3
8 9