[R-sig-Geo] Kriging

Jon Olav Skoien j.skoien at geo.uu.nl
Fri Dec 4 11:26:05 CET 2009

Hi Greg,

Variogram modelling is slower with large data sets, but 8-10.000 
observations should not be a problem, unless you need the results 
extremely fast. On my computer (3 years old) it takes about 4 seconds 
with 8.000 random observations, using the variogram function in gstat. 
Time increases approximately with the square of the number of observations:

coordinates(meuse) = ~x+y

samp = 1000
for (i in 1:5) {
  samp = samp*2
  m2 = SpatialPointsDataFrame(spsample(meuse,samp,"random"),data = 
data.frame(value = rnorm(samp)))
  tvar = system.time(vario <-variogram(value~1,m2))

What you could consider when you get to the kriging part, is to limit 
the number of neighbours to e.g. 50 (argument nmax). Otherwise you have 
to invert a matrix that is e.g. 10.000*10.000, which is slow, and can 
also get you close to the memory limit if you are using Windows.


> Hi, I have a very non-specific question about the number of sample points that
> can be used 
> for developing experimental variograms and kriging in R/gstat/etc. Does anyone
> have experience 
> using a very large number of data points in the kriging processes with R?  It
> has been a few 
> years since my last spatial stats course but I recall that I was limited in the
> number of data 
> points that R could handle.  I have a regional archaeological dataset with many
> data points.
> My sub-regions that I would like to use for kriging can contain 8,000-10,000
> data points.  Many 
> of these are zero values (not no data).  Am I going to have sample my sample if
> I want to 
> generate experimental variograms in R? Thanks in advance for any ideas, 
> Greg Luna
> 	[[alternative HTML version deleted]]
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

More information about the R-sig-Geo mailing list