fitspatgev: MLE for a spatial GEV model

Description Usage Arguments Details Value Author(s) Examples

View source: R/spatgev.R

Description

This function derives the MLE of a spatial GEV model.

Usage

1
2
3
4
fitspatgev(data, covariables, loc.form, scale.form, shape.form,
temp.cov = NULL, temp.form.loc = NULL, temp.form.scale = NULL,
temp.form.shape = NULL, ..., start, control = list(maxit = 10000),
method = "Nelder", warn = TRUE, corr = FALSE)

Arguments

data

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

covariables

Matrix with named columns giving required covariates for the GEV parameter models.

loc.form, scale.form, shape.form

R formulas defining the spatial models for the GEV parameters. See section Details.

temp.cov

Matrix with names columns giving additional *temporal* covariates for the GEV parameters. If NULL, no temporal trend are assume for the GEV parameters — see section Details.

temp.form.loc, temp.form.scale, temp.form.shape

R formulas defining the temporal trends for the GEV parameters. May be missing. See section Details.

start

A named list giving the initial values for the parameters over which the pairwise likelihood is to be minimized. If start is omitted the routine attempts to find good starting values - but might fail.

...

Several arguments to be passed to the optim functions. See section details.

control

The control argument to be passed to the optim function.

method

The method used for the numerical optimisation procedure. Must be one of BFGS, Nelder-Mead, CG, L-BFGS-B or SANN. See optim for details.

warn

Logical. If TRUE (default), users will be warned if the starting values lie in a zero density region.

corr

Logical. If TRUE, the asymptotic correlation matrix is computed.

Details

A kind of "spatial" GEV model can be defined by using response surfaces for the GEV parameters. For instance, the GEV location parameters are defined through the following equation:

μ = X_μ β_μ

where X_μ is the design matrix and β_μ is the vector parameter to be estimated. The GEV scale and shape parameters are defined accordingly to the above equation.

The log-likelihood for the GEV spatial model is consequently defined as follows:

llik(β) = ∑_(i=1)^(n.site) ∑_(j=1)^(n.obs) log f(y_(i,j);θ_i)

where θ_i is the vector of the GEV parameters for the i-th site.

Most often, there will be some dependence between stations. However, it can be seen from the log-likelihood definition that we supposed that the stations are mutually independent. Consequently, to get reliable standard error estimates, these standard errors are estimated with their sandwich estimates.

There are two different kind of covariates : "spatial" and "temporal".

A "spatial" covariate may have different values accross station but does not depend on time. For example the coordinates of the stations are obviously "spatial". These "spatial" covariates should be used with the marg.cov and loc.form, scale.form, shape.form.

A "temporal" covariates may have different values accross time but does not depend on space. For example the years where the annual maxima were recorded is "temporal". These "temporal" covariates should be used with the temp.cov and temp.form.loc, temp.form.scale, temp.form.shape.

As a consequence note that marg.cov must have K rows (K being the number of sites) while temp.cov must have n rows (n being the number of observations).

Value

An object of class spatgev. Namely, this is a list with the following arguments:

fitted.values

The parameter estimates.

param

All the parameters e.g. parameter estimates and fixed parameters.

std.err

The standard errors.

var.cov

The asymptotic MLE variance covariance matrix.

counts,message,convergence

Some information about the optimization procedure.

logLik,deviance

The log-likelihood and deviance values.

loc.form, scale.form, shape.form

The formulas defining the spatial models for the GEV parameters.

covariables

The covariables used for the spatial models.

ihessian

The inverse of the Hessian matrix of the negative log-likelihood.

jacobian

The variance covariance matrix of the score.

Author(s)

Mathieu Ribatet

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## 1- Simulate a max-stable random field
n.site <- 35
locations <- matrix(runif(2*n.site, 0, 10), ncol = 2)
colnames(locations) <- c("lon", "lat")
data <- rmaxstab(50, locations, cov.mod = "whitmat", nugget = 0, range =
  3, smooth = 0.5)

## 2- Transformation to non unit Frechet margins
param.loc <- -10 + 2 * locations[,2]
param.scale <- 5 + 2 * locations[,1]
param.shape <- rep(0.2, n.site)
for (i in 1:n.site)
  data[,i] <- frech2gev(data[,i], param.loc[i], param.scale[i],
param.shape[i])

## 3- Fit a ''spatial GEV'' mdoel to data with the following models for
##    the GEV parameters
form.loc <- loc ~ lat
form.scale <- scale ~ lon
form.shape <- shape ~ 1

fitspatgev(data, locations, form.loc, form.scale, form.shape)

Example output

      Model: Spatial GEV model
   Deviance: 14981.75 
        TIC: 15053.11 

    Location Parameters:
locCoeff1  locCoeff2  
    -8.51       2.09  
       Scale Parameters:
scaleCoeff1  scaleCoeff2  
      5.508        1.858  
       Shape Parameters:
shapeCoeff1  
     0.1173  

Standard Errors
  locCoeff1    locCoeff2  scaleCoeff1  scaleCoeff2  shapeCoeff1  
    1.18998      0.15609      0.59302      0.18268      0.08487  

Asymptotic Variance Covariance
             locCoeff1   locCoeff2   scaleCoeff1  scaleCoeff2  shapeCoeff1
locCoeff1     1.4160566  -0.0553390   0.4350946    0.1040226   -0.0254153 
locCoeff2    -0.0553390   0.0243647  -0.0029333    0.0014773   -0.0019375 
scaleCoeff1   0.4350946  -0.0029333   0.3516717    0.0184574    0.0050461 
scaleCoeff2   0.1040226   0.0014773   0.0184574    0.0333715    0.0003748 
shapeCoeff1  -0.0254153  -0.0019375   0.0050461    0.0003748    0.0072024 

Optimization Information
  Convergence: successful 
  Function Evaluations: 388 

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