Learn R Programming

geostatsp (version 0.7.0)

excProb: Exceedance probabilities

Description

Calculate exceedance probabilities pr(X > threshold) from an INLA result.

Usage

excProb(marginals, threshold=0, template=NULL, templateIdCol=NULL)

Arguments

marginals
A list of two-column matrices with columns named x and y containing the posterior distributions of random effects, as produced by inla.
threshold
the value which
template
A Raster or SpatialPolygonsDataFrame or SpatialPointsDataFrame object which the results will be contained in.
templateIdCol
The data column in template corresponding to names of marginals

Value

  • Either a vector of exceedance probabilities or an object of the same class as template.

Details

Numerically integrates the marginal posteriors to obtain pr(X > threshold).

Examples

Run this code
swissFit =  glgm(swissRain, cells=40, formula="lograin",
	covariates=swissAltitude)
	swissExc = excProb(swissFit$inla$marginals.random$space, log(300),
		swissRain)

Run the code above in your browser using DataLab