MaxStableRF {RandomFields} | R Documentation |
These functions simulate stationary and isotropic max-stable random fields with unit Frechet margins.
MaxStableRF(x, y=NULL, z=NULL, grid, model, param, maxstable, method=NULL, n=1, register=0, gridtriple=FALSE,...) InitMaxStableRF(x, y=NULL, z=NULL, grid, model, param, maxstable, method=NULL, register=0, gridtriple=FALSE)
x |
matrix of coordinates, or vector of x coordinates |
y |
vector of y coordinates |
z |
vector of z coordinates |
grid |
logical; determines whether the vectors x ,
y , and z should be
interpreted as a grid definition, see Details. |
model |
string; see CovarianceFct , or
type PrintModelList () to get all options;
interpretation depends on the value of maxstable ,
see Details. |
param |
parameter vector:
param=c(mean, variance, nugget, scale,...) ;
the parameters must be given
in this order; further parameters are to be added in case of a
parametrised class of covariance functions,
see CovarianceFct , or be given in one of the extended
forms, see Details |
maxstable |
string. Either 'extremalGauss' or 'BooleanFunction'; see Details. |
method |
NULL or string; method used for simulating,
see RFMethods , or
type PrintMethodList () to get all options;
interpretation depends on the value of maxstable . |
n |
number of realisations to generate |
register |
0:9; place where intermediate calculations are stored; the numbers are aliases for 10 internal registers |
gridtriple |
logical; if gridtriple=FALSE ascending
sequences for the parameters
x , y , and z are
expected; if gridtriple=TRUE triples of form
c(start,end,step)
expected; this parameter is used only
if grid=TRUE |
... |
RFparameters that are locally used only. |
There are two different kinds of models for max-stable processes implemented:
maxstable="extremalGauss"
param
, the model
,
and the method
are interpreted
in the same way as for Gaussian random fields, see
GaussRF
.
maxstable="BooleanFunction"
RFMethods
. Hence, only
models that are suitable for the random coin method
are suitable for this technique, see PrintModelList
()
for a complete list of suitable covariance models.method
is 'max.MPP' (and
NULL
),
see PrintMethodList()
. In the parameter list
param
the first two entries, namely mean
and
variance
, are ignored. If the nugget is positive,
for each point an additional independent unit Frechet variable
with scale parameter
nugget
is involved when building the maximum
over all functions.
The model may be defined alternatively in one of the two extended
ways as introduced in CovarianceFct
and GaussRF
.
However only a single model may be given! The model may be
anisotropic.
InitMaxStableRF
returns 0 if no error has occurred, and
a positive value if failed.
MaxStableRF
and DoSimulateRF
return NULL
if an error has occurred; otherwise the returned object
depends on the parameters:
n=1
:
* grid=FALSE
. A vector of simulated values is
returned (independent of the dimension of the random field)
* grid=TRUE
. An array of the dimension of the
random field is returned.
n>1
:
* grid=FALSE
. A matrix is returned. The columns
contain the realisations.
* grid=TRUE
. An array of dimension
d+1, where d is the dimension of
the random field, is returned. The last
dimension contains the realisations.
Martin Schlather, martin.schlather@math.uni-goettingen.de http://www.stochastik.math.uni-goettingen.de/institute
Schlather, M. (2002) Models for stationary max-stable random fields. Extremes 5, 33-44.
CovarianceFct
,
GaussRF
,
RandomFields
,
RFMethods
,
RFparameters
,
DoSimulateRF
,
.
n <- 30 ## nicer, but time consuming if n <- 100 x <- y <- 1:n ms0 <- MaxStableRF(x, y, grid=TRUE, model="exponen", param=c(0,1,0,40), maxstable="extr" ,CE.force = TRUE ) image(x,y,ms0) ############################################################ ## ## ## Plots used in M. Schlather, Extremes 5:1, 33-44, 2002 ## ## ## ############################################################ pts <- if (interactive()) 512 else 32 x <- (1:pts) / pts * 10 scalegauss <- 1.5 RFparameters(MPP.radius=2*scalegauss, Print=3) runif(1) save.seed <- .Random.seed ms1 <- MaxStableRF(x, x, model="gauss", param=c(0, 1, 0, scalegauss), maxstable="Bool", grid=TRUE) image(x, x, sqrt(ms1)) scalecone <- 3.7 .Random.seed <- save.seed ms2 <- MaxStableRF(x, x, model="cone", param=c(0, 1, 0, scalecone, 0, 0, 1), maxstable="Bool", grid=TRUE) image(x, x, sqrt(ms2)) .Random.seed <- save.seed ms3 <- MaxStableRF(x, x, model="exponen", param=c(0, 1, 0, 1), maxstable="extr", grid=TRUE, method="ci") image(x, x, sqrt(ms3)) .Random.seed <- save.seed ms4 <- MaxStableRF(x, x, model="gauss", param=c(0, 1, 0, 1), maxstable="extr", grid=TRUE, method="ci") image(x, x, sqrt(ms4))