condmap: Produces a conditional 2D map from a fitted max-stable...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Produces a conditional 2D map from a fitted max-stable process.

Usage

1
2
3
condmap(fitted, fix.coord, x, y, covariates = NULL, ret.per1 = 100,
ret.per2 = ret.per1, col = terrain.colors(64), plot.contour = TRUE,
...)

Arguments

fitted

An object of class maxstab. Most often, it will be the output of the function fitmaxstab.

fix.coord

The spatial coordinates of the location from which the conditional quantile is computed.

x,y

Numeric vector defining the grid at which the levels are computed.

covariates

An array specifying the covariates at each grid point defined by x and y. If NULL, no covariate is needed. See map to see how to build it.

ret.per1,ret.per2

Numerics giving the return period for which the quantile map is plotted. See details.

col

A list of colors such as that generated by 'rainbow', 'heat.colors', 'topo.colors', 'terrain.colors' or similar functions.

plot.contour

Logical. If TRUE (default), contour lines are added to the plot.

...

Several arguments to be passed to the image function.

Details

The function solves the following equation:

Pr[Z(x_2) > z_2 | Z(x_1) > z_1] = 1 / T_2

where z_1 = -1 / log(1 - 1/T_1).

In other words, it computes, given that at location x_1 we exceed the level z_1, the levels which is expected to be exceeded in average every T_2 year.

Value

A plot. Additionally, a list with the details for plotting the map is returned invisibly.

Author(s)

Mathieu Ribatet

See Also

map, filled.contour, heatmap, heat.colors, topo.colors, terrain.colors, rainbow

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
##Define the coordinate of each location
n.site <- 30
locations <- matrix(runif(2*n.site, 0, 10), ncol = 2)
colnames(locations) <- c("lon", "lat")

##Simulate a max-stable process - with unit Frechet margins
data <- rmaxstab(50, locations, cov.mod = "whitmat", nugget = 0, range =
2, smooth = 1)

##Now define the spatial model for the GEV parameters
param.loc <- -10 - 4 * locations[,1] + locations[,2]^2
param.scale <- 5 + locations[,2] + locations[,1]^2 / 10
param.shape <- rep(.2, n.site)

##Transform the unit Frechet margins to GEV
for (i in 1:n.site)
  data[,i] <- frech2gev(data[,i], param.loc[i], param.scale[i],
param.shape[i])

##Define a model for the GEV margins to be fitted
##shape ~ 1 stands for the GEV shape parameter is constant
##over the region
loc.form <- loc ~ lon + I(lat^2)
scale.form <- scale ~ lat + I(lon^2)
shape.form <- shape ~ 1

##  1- Fit a max-stable process
fitted <- fitmaxstab(data, locations, "whitmat", loc.form, scale.form,
                     shape.form, nugget = 0)

cond.coord <- c(5.1, 5.1)
condmap(fitted, cond.coord, seq(0, 10, length = 25), seq(0,10, length
 =25), ret.per1 = 100, ret.per2 = 1.5)
points(t(cond.coord), pch = "*", col = 2, cex = 2)

Example output

Computing appropriate starting values
Starting values are defined
Starting values are:
      range      smooth   locCoeff1   locCoeff2   locCoeff3 scaleCoeff1 
 1.05676396  1.79636861 -8.43385849 -4.09474844  1.00287726  5.26106517 
scaleCoeff2 scaleCoeff3 shapeCoeff1 
 1.20076160  0.08369529  0.12338157 

SpatialExtremes documentation built on May 2, 2019, 5:45 p.m.