concurrencemap: Maps of concurrence probabilities/expected concurrence cell...

View source: R/concurrence.R

concurrencemapR Documentation

Maps of concurrence probabilities/expected concurrence cell area

Description

This function produces maps for concurrence probabilities or expected concurrence cell areas.

Usage

concurrencemap(data, coord, which = "kendall", type = "cell", n.grid =
100, col = cm.colors(64), plot = TRUE, plot.border = NULL,
compute.std.err = FALSE, ...)

Arguments

data

A matrix representing the data. Each column corresponds to one location.

coord

A matrix that gives the coordinates of each location. Each row corresponds to one location.

which

A character string specifying which estimator should be used. Should be one of "emp" (empirical), "boot" (bootstrap version) and "kendall" (kendall based).

type

Either "cell" for cell areas or a integer between 1 and the number of locations specifying which site should be used as reference location—see Details.

n.grid

Integer specifying the size of the prediction grid.

col

The colors used to produce the map.

plot

Logical. If TRUE (default), a map is produced; otherwise results are invisibly returned.

plot.border

The name of an R function that can be used to plot the border of the study region. If NULL, no border are plotted.

compute.std.err

Logical. If TRUE, a map of standard errors is also produced. It is currently only available for concurrence probability maps.

...

Additional options to be passed to the image function.

Value

This function returns invisibly a list with the x and y coordinates and the corresponding values for the estimated concurrence probabilities or expected concurrence cell area.

Author(s)

Mathieu Ribatet

References

Dombry, C., Ribatet, M. and Stoev, S. (2015) Probabilities of concurrent extremes. Submitted

See Also

concprob

Examples

##require(maps) ## <<-- to plot US borders
data(USHCNTemp)
coord <- as.matrix(metadata[,2:3])

## Subset the station to have a fast example
n.site <- 30
chosen.site <- sample(nrow(coord), n.site)
coord <- coord[chosen.site,]
maxima.summer <- maxima.summer[,chosen.site]

## Define a function to plot the border
border <- function(add = FALSE) maps::map("usa", add = add)

par(mar = rep(0, 4))
## Produce a pairwise concurrence probability map w.r.t. station number 15
concurrencemap(maxima.summer, coord, type = 15, plot.border = border,
 compute.std.err = TRUE)

## Produce the expected concurrence cell area
concurrencemap(maxima.summer, coord, plot.border = border)

SpatialExtremes documentation built on April 19, 2022, 5:06 p.m.