Questions tagged [gstat]

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

130 questions
0
votes
2 answers

how to sum raster layer to raster stack R

I'm working with a raster stack of 300 SGS, sims, and a raster layer, trend. I'm trying to sum trend to each of the raster layers in the stack. My end goal is to have a new raster stack of my simulations with the trend map so that I can then preform…
0
votes
2 answers

How to add coeficient to linear model

I want to manually set a coefficient for a variable that is not input in my linear model so that I can perform a spatial prediction. I'm going to try to expose my question in the most simple and clear way. What I have: a raster stack with 4 binary…
0
votes
1 answer

Bubble plot corresponding dot negative and positive values in R

I want to plot bubbles of my data. Here is what I already have: library(sp) library(rgdal) require(gstat) setwd("C:/Users/49151/Desktop") #import data data <- read.csv("kerpentest0909x.csv") head(data) hist(data$Z, breaks = 20, xlab = "subsidence…
0
votes
1 answer

R plot.gstatVariogram function not callable in VSCode

When I'm running the following R code in RStudio I get suitable results/plots: # Load Libraries library(maptools) library(spatstat) library(gstat) library(rgdal) # Define File Paths path_data <- file.path(getwd(), "Data") path_export <-…
Woidfeeee
  • 41
  • 12
0
votes
1 answer

autofitVariogram in automap: cutoff option doesn't work

I'd like to create a spatial separation distance up to which point pairs are included in semivariance estimates (cutoff function in variogram {gstat}), but using autofitVariogram in automap package. Despite the use of miscFitOptions function nothing…
Leprechault
  • 1,531
  • 12
  • 28
0
votes
1 answer

Coefficients estimated using fit.variogram don't match the plot with the model fit (gstat R package)

I'm fitting an exponential model to an empirical semivariogram using the package gstat. My dataset (data) has latitude and longitude values in decimal degrees. The range estimated using fit.variogram() doesn't match the range that I'd expect by…
Sil
  • 25
  • 4
0
votes
1 answer

Spatio Temporal Interpolation with gstat in R-Studio - Fitting the correct variogram

I am very new to spatial evaluation and come from psychology. I am using the software R and the packages "gstat" and "spacetime". I would like to do a spatio temporal interpolation. For this I follow the paper of Gräler et al.…
0
votes
2 answers

Iterate over multiple dependent variables (columns) of an sp dataframe when using krige.cv

I have a SpatialPointsDataframe called rain and I would like to fit a variogram and perfom cross-validation for each one of its last 10 columns (dependent variables) like below: fit.reg.vgm <- autofitVariogram( column (dependent variable) ~ X +…
0
votes
1 answer

Variogram manual calculation

I have a question about variograms please. In fact, I only have points with their Z(pi) values and the distances between them. (For example a point p1(z(p1),d(p1,p2), d(p1,p3),.., d(p1,pn))) I want to estimate the variogram for those having a…
roger
  • 89
  • 10
0
votes
1 answer

Kriging in gstat

I have a problem with code that ran 1000 times without error. Error message: "Error in bb[, "max"] : subscript out of bounds" I have no clue what bb means. I thought bbox but that is same for grid and…
0
votes
1 answer

Gstat prediciton with heterogenous measurement errors

I have a set of measurements for a variable Z over a non uniform grid in X and Y. For each Z value I have a mean plus a variance of the measurement. That is, I have a data set (Zmean_i,Zvariance_i,X_i,Y_i) i=1..N. In other words, some estimates of…
0
votes
1 answer

Variogram in R with distance in km

I'm doing a spatial analysis on my data and I have their localization in terms of longitude and latitude. I calculated the sample variogram in R with geoR and gstat but what I get is the sample variogram with the distance in grades (longitude and…
AliceW
  • 21
  • 1
0
votes
0 answers

Export STFDF to csv

I have a STFDF object (spatio-temporal) with three properties @data, @sp and @time and I want to export the data to a csv file of the following format: latitude longtitude timestamp Value How to do it in R?
lenhhoxung
  • 2,530
  • 2
  • 30
  • 61
0
votes
0 answers

how to make a proper grid in case of a GAM + OK kriging method?

I am struggling with a Kriging + GAM problem since a while and hope someone will be able to help me. I am trying to make interpolation of a pollutant into an area. To do so, I use ordinary kriging from gstat, in addition to GAM, based on this…
0
votes
1 answer

Is it possible to do anisotropic IDW estimation (and cross validation) using gstat in R?

I am comparing cross validation ("leave one out") results for different variogram models for a 3D data set using the gstat library in R. I would like to compare similar cross validation results for inverse distance estimates as well, but I can't see…
1 2 3
8 9