fitspatgev | R Documentation |
This function derives the MLE of a spatial GEV model.
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)
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 |
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
|
... |
Several arguments to be passed to the
|
control |
The control argument to be passed to the
|
method |
The method used for the numerical optimisation
procedure. Must be one of |
warn |
Logical. If |
corr |
Logical. If |
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).
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. |
Mathieu Ribatet
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.