Learn R Programming

automap (version 1.1-16)

posPredictionInterval: Determines the position of the p% prediction interval

Description

This function calculates the p% prediction interval and determines the position of this interval relative to value. This can be higher, lower or not distinguishable.

Usage

posPredictionInterval(krige_object, 
                      p = 95, 
                      value = median(krige_object$krige_output$var1.pred))

Value

The output object is of class posPredictionInterval and contains the results of the function in an Spatial-class object similar to the one in the input object. This means that if the input object containes a grid, the results are also returned on that same grid. Also included in the return object are the values for p and value.

Arguments

krige_object

The result of from the autoKrige procedure. This is expected to be a autoKrige-object.

p

The p% percent prediction interval is compared to value

value

The value to which the the p% prediction interval compared

Author

Paul Hiemstra, paul@numbertheory.nl

See Also

autoKrige, autofitVariogram

Examples

Run this code
library(sp)
data(meuse)
coordinates(meuse) =~ x+y
data(meuse.grid)
gridded(meuse.grid) =~ x+y

kriging_result = autoKrige(zinc~1, meuse, meuse.grid)
pos = posPredictionInterval(kriging_result, 95, 75)
plot(pos)

Run the code above in your browser using DataLab