blockPredict {intamap} | R Documentation |
Spatial block prediction
Description
blockPredict
is a generic method for prediction of
spatially aggregated variables within the intamap-package
package.
Usage
blockPredict(object, ...)
Arguments
object |
a list object of the type described in |
... |
other arguments that will be passed to the requested interpolation method.
See the individual interpolation methods for more information. The following arguments
from
|
Details
The function blockPredict
is a wrapper around the spatialPredict.block
function
within the intamap-package
package, to simplify the calls for block predictions.
Block predictions are spatial predictions assumed to be valid for a certain area.
The blocks can either be given by passing SpatialPolygons
as the
predicitonLocations or by passing the block-argument through the parameters of the
object or through the ...
-argument.
There are esentially two ways to solve the problems of block predictions.
- analytical
block predictions can be found directly by block kriging
- numerical
block predictions can be found through numerical simulations over a set of points within the block, the requested output is found by averaging over these simulations
The analytical solutions are used when applicable. This is typically for ordinary kriging based methods and prediction types that can be found by linear aggregation (e.g. block mean).
If the prediction type necessitates simulations, this is done by subsampling the blocks. This can either be done block-wise, with a certain number of points within each block, with a certain cellsize, or with a certain number of points
automap
Uses function autoKrige
in the
automap
package.
If object
already includes a variogram model,
krige
in the gstat
-package will be called directly.
Value
a list object similar to object
, but extended with predictions at
a the set of locations defined object
.
Author(s)
Jon Olav Skoien
References
Pebesma, E., Cornford, D., Dubois, G., Heuvelink, G.B.M., Hristopulos, D., Pilz, J., Stohlker, U., Morin, G., Skoien, J.O. INTAMAP: The design and implementation f an interoperable automated interpolation Web Service. Computers and Geosciences 37 (3), 2011.
See Also
Examples
# This example skips some steps that might be necessary for more complicated
# tasks, such as estimateParameters and pre- and postProcessing of the data
data(meuse)
coordinates(meuse) = ~x+y
meuse$value = log(meuse$zinc)
data(meuse.grid)
gridded(meuse.grid) = ~x+y
proj4string(meuse) = CRS("+init=epsg:28992")
proj4string(meuse.grid) = CRS("+init=epsg:28992")
# set up intamap object:
obj = createIntamapObject(
observations = meuse,
predictionLocations = meuse.grid[sample(1:length(meuse.grid),10),],
targetCRS = "+init=epsg:3035",
class = "automap"
)
# do interpolation step:
obj = conformProjections(obj)
obj = estimateParameters(obj)
obj = blockPredict(obj,block=c(100,100)) # blockPredict
# intamap object for which simulation is needed:
meuse$value = meuse$zinc
obj = createIntamapObject(
observations = meuse,
predictionLocations = meuse.grid[sample(1:length(meuse.grid),5),],
params = list(ngrid = 16),
class = "transGaussian" # trans-Gaussian kriging method
)
obj = estimateParameters(obj, lambda = 0) # lambda is optional, lambda = 0 gives lognormal kriging
obj = blockPredict(obj,block=c(100,100)) # blockPredict