| print {SpatialExtremes} | R Documentation |
A method for printing object of class ''spatgev''.
## S3 method for class 'spatgev':
print(x, digits = max(3, getOption("digits") - 3),
...)
x |
An object of class ''spatgev''. Most often, x is the
output of the fitspatgev function. |
digits |
The number of digits to be printed. |
... |
Other options to be passed to the print
function. |
Print several information on screen.
Mathieu Ribatet
## 1- Simulate a max-stable random field
require(RandomFields)
n.site <- 35
locations <- matrix(runif(2*n.site, 0, 10), ncol = 2)
colnames(locations) <- c("lon", "lat")
ms0 <- MaxStableRF(locations[,1], locations[,2], grid=FALSE, model="wh",
param=c(0,1,0,3, .5), maxstable="extr",
n = 50)
## 2- Transformation to non unit Frechet margins
ms1 <- t(ms0)
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)
ms1[,i] <- param.scale[i] * (ms1[,i]^param.shape[i] - 1) /
param.shape[i] + param.loc[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(ms1, locations, form.loc, form.scale, form.shape)