Learn R Programming

SpatialExtremes (version 2.0-0)

print.spatgev: Printing objects of class ''spatgev''

Description

A method for printing object of class ''spatgev''.

Usage

## S3 method for class 'spatgev':
print(x, digits = max(3, getOption("digits") - 3),
...)

Arguments

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.

Value

  • Print several information on screen.

Examples

Run this code
## 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)

Run the code above in your browser using DataLab