Description Usage Arguments Details Value Author(s) References See Also Examples
This function generates realisations from a max-linear model.
1 2 |
n |
Integer. The number of observations. |
coord |
A vector or matrix that gives the coordinates of each
location. Each row corresponds to one location - if any. May be
missing if |
cov.mod |
A character string that specifies the max-linear
model. Currently only the discretized Smith model is implemented,
i.e., |
dsgn.mat |
The design matrix of the max-linear model — see
Section Details. May be missing if |
grid |
Logical. Does |
p |
An integer corresponding to the number of unit Frechet random variable used in the max-linear model — see Section Details. |
... |
The parameters of the max-stable model — see Section Details. |
A max-linear process {Y(x)} is defined by
Y(x) = max_{j=1, …, p} f_j(x) Z_j, x in R^d,
where p is a positive integer, f_j are non negative functions and Z_j are independent unit Frechet random variables. Most often, the max-linear process will be generated at locations x_1, …, x_k in R^d and an alternative but equivalent formulation is
Y = A * Z,
where Y = {Y(x_1), …, Y(x_k)}, Z = (Z_1, …, Z_p), * is the max-linear operator, see the first equation, and A is the design matrix of the max-linear model. The design matrix A is a k x p matrix with non negative entries and whose i-th row is {f_1(x_i), …, f_i(x_p)}.
Currently only the discretized Smith model is implemented for which
f_j(x) = c(p) phi(x -
u_j ; Sigma) where phi( . ; Sigma) is the
zero mean (multivariate) normal density with covariance matrix
Sigma, u_j is a sequence of deterministic
points appropriately chosen and c(p) is a constant
ensuring unit Frechet margins. Hence if this max-linear model is used,
users must specify var
for one dimensional processes, and
cov11
, cov12
, cov22
for two dimensional
processes.
A matrix containing observations from the max-linear model. Each
column represents one stations. If grid = TRUE
, the function
returns an array of dimension nrow(coord) x nrow(coord) x n.
Mathieu Ribatet
Wang, Y. and Stoev, S. A. (2011) Conditional Sampling for Max-Stable Random Fields. Advances in Applied Probability.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## A one dimensional simulation from a design matrix. This design matrix
## corresponds to a max-moving average process MMA(alpha)
n.site <- 250
x <- seq(-10, 10, length = n.site)
## Build the design matrix
alpha <- 0.8
dsgn.mat <- matrix(0, n.site, n.site)
dsgn.mat[1,1] <- 1
for (i in 2:n.site){
dsgn.mat[i,1:(i-1)] <- alpha * dsgn.mat[i-1,1:(i-1)]
dsgn.mat[i,i] <- 1 - alpha
}
data <- rmaxlin(3, dsgn.mat = dsgn.mat)
matplot(x, t(log(data)), pch = 1, type = "l", lty = 1, ylab =
expression(log(Y(x))))
## One realisation from the discretized Smith model (2d sim)
x <- y <- seq(-10, 10, length = 100)
data <- rmaxlin(1, cbind(x, y), cov11 = 3, cov12 = 1, cov22 = 4, grid =
TRUE, p = 2000)
image(x, y, log(data), col = heat.colors(64))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.