condrmaxlin: Conditional simulation of max-linear random fields

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

View source: R/conditionalSim.R

Description

This function generates (approximate) conditional simulation of unit Frechet max-linear random fields. It can be used to get approximate conditional simulation for max-stable processes.

Usage

1
2
condrmaxlin(n, coord, data.coord, data, cov.mod = "gauss", ..., grid =
FALSE, p = 10000)

Arguments

n

Integer. The number of conditional simulations.

coord

A numeric vector or matrix specifying the coordinates where the process has to be generated. If coord is a matrix, each row specifies one locations.

data.coord

A numeric vector or matrix specifying the coordinates where the process is conditioned.

data

A numeric vector giving the conditioning observations.

cov.mod

A character string specifying the max-stable model. See section Details.

...

The parameters of the max-stable model. See section Details.

grid

Logical. Does coord defines a grid?

p

An integer. The number of unit Frechet random variables used in the max-linear approximation.

Details

Any unit Frechet max-stable processes Z(x) can be approximated by a unit Frechet max-linear process, i.e.,

Z(x) ~ max_{j=1, …, p} f_j(x) Z_j,

where f_j are non-negative deterministic functions, p is a sufficiently large integer and Z_j are independent unit Frechet random variables. Note that to ensure unit Frechet margins, the following condition has to be satisfied

∑_{j=1, …, p} f_j(x) = 1,

for all x.

Currently only the discretized Smith model is implemented for which f_j(x) = c(p) φ(x - u_j ; Σ) where φ( . ; Σ) is the zero mean (multivariate) normal density with covariance matrix Σ, u_j is a sequence of deterministic points appropriately chosen and c(p) is a constant ensuring unit Frechet margins.

Value

A matrix containing observations from the required max-stable model. Each column represents one stations. If grid = TRUE, the function returns an array of dimension nrow(coord) x nrow(coord) x n.

Warnings

It may happen that some conditional observations are not honored because the approximation of a max-stable process by a max-linear one isn't accurate enough! Sometimes taking a larger p solves the issue.

Author(s)

Mathieu Ribatet

References

Wang, Y. and Stoev, S. A. (2011) Conditional Sampling for Max-Stable Random Fields. Advances in Applied Probability.

See Also

rmaxstab, condrmaxlin

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
## One dimensional conditional simulations
n.cond.site <- 10
cond.coord <- runif(n.cond.site, -10, 10)
data <- rmaxlin(1, cond.coord, var = 3, p = 10000)

x <- seq(-10, 10, length = 250)
cond.sim <- condrmaxlin(5, x, cond.coord, data, var = 3)

matplot(x, t(log(cond.sim)), type = "l", lty = 1, pch = 1)
points(cond.coord, log(data))

## Two dimensional conditional simulation
cond.coord <- matrix(runif(2 * n.cond.site, -10, 10), ncol = 2)
data <- rmaxstab(1, cond.coord, "gauss", cov11 = 4, cov12 = 0, cov22 = 4)

x <- y <- seq(-10, 10, length = 75)
cond.sim <- condrmaxlin(4, cbind(x, y), cond.coord, data, cov11 = 4,
cov12 = 0, cov22 = 4, grid = TRUE, p = 2000)
## Note p is set to 2000 for CPU reasons but is likely to be too small

op <- par(mfrow = c(2, 2), mar = rep(1, 4))
for (i in 1:4){
image(x, y, log(cond.sim[,,i]), col = heat.colors(64), xaxt = "n", yaxt
= "n", bty = "n")
contour(x, y, log(cond.sim[,,i]), add = TRUE)
text(cond.coord[,1], cond.coord[,2], round(log(data), 2), col = 3)
}
par(op)

Example output

Warning message:
In condrmaxlin(5, x, cond.coord, data, var = 3) :
  Some conditional observations aren't honored!
 The maximum absolute difference was 1.01 for site #3

SpatialExtremes documentation built on Sept. 1, 2020, 3:01 a.m.