gstat is an R package for spatial and spatio-temporal geostatistical modelling, prediction and simulation
Questions tagged [gstat]
130 questions
1
vote
1 answer
How to fill NA gaps by IDW using focal (R raster/terra)?
I have a big raster with some NA cells that need to be filled. I want to fill it by Inverse Distance Weighting (IDW), by considering the 9 nearest [valid] cells. I used the idw function from the gstat package, but although it works, it takes ages to…

silasprincipe
- 45
- 3
1
vote
0 answers
Universal kriging has a long processing time compared to other kriging methods - R
I have a dataset data_sp with 132 observations containing 9 predictors and 1 response variable. I perform a twenty-fold cross validation, using ordinary kriging and universal kriging. The raster grid100 on which I do my kriging, contains 61124…

Foeke Boersma
- 95
- 6
1
vote
0 answers
Kriging with gstat: including a random effect
I am getting acquainted with gstat and kriging more generally in R. The end goal is to interpolate temperature across my spatial grid, and I want to be able to do so for different time points (average daily temperature over several years). So, I've…

Johanna Fornberg
- 11
- 3
1
vote
0 answers
Universal kriging in r. The function predict.gstat return all values as NA
I'm trying to do a universal kriging to get a plot with the predicted values inside a map of a data state. However, after fitting the model and calling the predict.gstat function, the var1.pred values are all NA. It is likely that the error is…

Ivan Bezerra Allaman
- 79
- 1
- 9
1
vote
0 answers
1D gstat's variogram
I want to convert this code from 2D to 1D to estimate the variogram. Also, I want to make a loop to do that code for multiple csv files.
#Load…

Michael
- 11
- 3
1
vote
0 answers
How to perform regression Kriging with R studio using gstat?
I'm struggling with regression kriging in R. I want to interpolate the temperature of a watershed under consideration of elevation, but get always the same error when I want to perform the last step, which is the kriging.
I have two data frames, one…

DAFZ
- 11
- 3
1
vote
1 answer
How to get predictions beyond location of sample points with the gstat package?
When using the gstat package to do spatial interpolation using the krige function, I only get results in sample locations. This is not what I was expecting, having read clear explanation of how it works, with a reproducible example here:…

RobinLovelace
- 4,799
- 6
- 29
- 40
1
vote
0 answers
Why is kriging using parallel processing still using memory and not using my processors?
I have a large dataset of measurement over an area. I want to interpolate my data using kriging over my study area. My final output should be a raster/grid.
My pc has 8Gb RAM and 4 cores. When I try to use predict() with my fitted variogram, my…

A. Lachaud
- 15
- 1
- 5
1
vote
0 answers
Strange output on PM10 gstat spatiotemporal kriging
first post here :) Really simple questions in bold. I want to do kriging using PM10 daily data for 8 static stations in Santiago, Chile, from 1997-2012, into 34 centroids which map different counties. I explain what I've done so far with some…

Andrés Leslie
- 11
- 2
1
vote
1 answer
Kriging with gstat : "Covariance matrix singular at location" with predict
I am trying to do an estimation by kriging with gstat, but can never achieve it because of an issue with the covariance matrix. I never have estimates on the locations I want, because they are all skipped. I have the following warning message, for…

Dric
- 87
- 13
1
vote
1 answer
gstat in R - Variogram cutoff distance is not working at larger specified distances with large gridded datasets
I am attempting to compute variograms in R with the gstat package of biomass data across management areas. The biomass data is a raster dataset with a 3.5 ft resolution or 1.0668m. The size of the spatialpointsDataFrame I am passing to the variogram…

vsjansen
- 11
- 3
1
vote
1 answer
Conditional simulation (with Kriging) in R with parallelization?
I am using gstat package in R to generate sequential gaussian simulations. My pc have 4 cores and I tried to parallelize the krige() function using the parallel package following the script provided by Guzmán to answer the question How to achieve…

maluicr
- 37
- 6
1
vote
0 answers
R version 3.3.2, Windows 10: gstat package: Error in fitting a variogram model using 'fit.variogram' function
I am having some problem with fit.variogram function of the gstat package. My code, data, error message and traceback() message can be found below. Any suggestion to approach this problem would be appreciated.…

Saubhagya
- 51
- 1
- 4
1
vote
1 answer
Simple variogram in R, understanding gstat::variogram() and object gstat
I have a data.frame in R whose variables represent locations and whose observations are measures of a certain variable in those locations. I want to measure the decay of dependence for certain locations depending on distance, so the variogram comes…

D1X
- 5,025
- 5
- 21
- 36
1
vote
1 answer
Interpolate to raster
I have a three column dataset with LAT, LON and Temperature data
I would like to produce a raster image that predicts the temperature of the landscape based on 24 data logger data points. The dataset can be accessed here: DATA
This is what I have…

I Del Toro
- 913
- 4
- 15
- 36