New answers tagged spatial-statistics
I found I was able to solve the problem using the nncross() function in the package spatstat. I don't know if this was the simplest solution, since it required first converting my SpatialPoints to class ppp. In any case here it is: library('raster') library('spatstat') # Make the grid. Use raster() and then convert. # Not the most direct but it works. ...
Could you write a script that takes each epicentre and creates a buffer. This buffer selects lightening strike points within that radius, then select a subset of this that is within an appropriate time envelope. You could then run this with different parameters ( increasing buffer size around the epicenter) and also time envelope definition (I.e. before the ...
You could treat this as a (degenerate) interpolation problem, using a neighbourhood of one, try something along the lines of library(gstat) i = idw(var~1, old, ggg, nmax = 1, maxdist = 500) library(sp) spplot(i) where var refers to the name of the variable you sampled.
Great question you've written here. There are two problems with your code. The first and most crucial is shown below: states.spdf$frac.pop = states.spdf$total.pop / (states.spdf$ALAND10+states.spdf$AWATER10)*raster.res You are assuming that population is equally distributed in space, however you treat density wrong. Instead of using raster.res to ...
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 this out this code and replaced it with the BLAS/LAPACK which are native in R. LAPACK uses Choleski decomposition. LDLfactor allows for some non-positive ...
Yes, this is correct. When you print the model by typing model.vari you'll see sill values, split up in a nugget component (the offset) and the exponential component. The sum of these two is usually indicated by "the sill value" (i.e., around 25).
Top 50 recent answers are included