Statistical modelling of spatial extremes using the SpatialExtremes package

Similar documents
Modelling spatial extremes using max-stable processes

Max-stable processes: Theory and Inference

Simulation of Max Stable Processes

Conditional simulations of max-stable processes

Models for Spatial Extremes. Dan Cooley Department of Statistics Colorado State University. Work supported in part by NSF-DMS

Extreme Value Analysis and Spatial Extremes

Conditional simulation of max-stable processes

Journal de la Société Française de Statistique. Spatial extremes: Max-stable processes at work

Spatial extreme value theory and properties of max-stable processes Poitiers, November 8-10, 2012

Estimation of spatial max-stable models using threshold exceedances

Approximate Bayesian computation for spatial extremes via open-faced sandwich adjustment

Bayesian inference for multivariate extreme value distributions

Geostatistics of Extremes

Spatial Extremes in Atmospheric Problems

arxiv: v1 [stat.me] 16 Dec 2011

A User s Guide to the SpatialExtremes Package

SPATIAL ASSESSMENT OF EXTREME SIGNIFICANT WAVES HEIGHTS IN THE GULF OF LIONS

Generating gridded fields of extreme precipitation for large domains with a Bayesian hierarchical model

PUBLICATIONS. Water Resources Research. Assessing the performance of the independence method in modeling spatial extreme rainfall

The extremal elliptical model: Theoretical properties and statistical inference

A HIERARCHICAL MAX-STABLE SPATIAL MODEL FOR EXTREME PRECIPITATION

Likelihood-based inference for max-stable processes

Geostatistics of extremes

Introduction to Spatial Data and Models

Max-stable processes and annual maximum snow depth

Extreme value statistics: from one dimension to many. Lecture 1: one dimension Lecture 2: many dimensions

Introduction to Spatial Data and Models

arxiv: v2 [stat.me] 25 Sep 2012

Richard L. Smith Department of Statistics and Operations Research University of North Carolina Chapel Hill, NC

Max-stable Processes for Threshold Exceedances in Spatial Extremes

A spatio-temporal model for extreme precipitation simulated by a climate model

Bayesian Inference for Clustered Extremes

Using spatial and spatial-extreme statistics to characterize snow avalanche cycles

Two practical tools for rainfall weather generators

Threshold estimation in marginal modelling of spatially-dependent non-stationary extremes

On the occurrence times of componentwise maxima and bias in likelihood inference for multivariate max-stable distributions

The ProbForecastGOP Package

Extreme Precipitation: An Application Modeling N-Year Return Levels at the Station Level

Multivariate Gaussian Random Fields with SPDEs

Max stable Processes & Random Fields: Representations, Models, and Prediction

Bayesian Modeling of Air Pollution Extremes Using Nested Multivariate Max-Stable Processes

Chapter 12: An introduction to Time Series Analysis. Chapter 12: An introduction to Time Series Analysis

CRPS M-ESTIMATION FOR MAX-STABLE MODELS WORKING MANUSCRIPT DO NOT DISTRIBUTE. By Robert A. Yuen and Stilian Stoev University of Michigan

MODELING EXTREME VALUES OF PROCESSES OBSERVED AT IRREGULAR TIME STEPS: APPLICATION TO SIGNIFICANT WAVE HEIGHT

BAYESIAN KRIGING AND BAYESIAN NETWORK DESIGN

Extremes and Atmospheric Data

Models for spatial data (cont d) Types of spatial data. Types of spatial data (cont d) Hierarchical models for spatial data

Statistics for extreme & sparse data

Inference with few assumptions: Wasserman s example

Nonstationary spatial process modeling Part II Paul D. Sampson --- Catherine Calder Univ of Washington --- Ohio State University

Introduction to Bayes and non-bayes spatial statistics

Composite Likelihood

Asymptotic inference for a nonstationary double ar(1) model

Cross-covariance Functions for Tangent Vector Fields on the Sphere

Soutenance d Habilitation à Diriger des Recherches. Théorie spatiale des extrêmes et propriétés des processus max-stables

Wrapped Gaussian processes: a short review and some new results

A Framework for Daily Spatio-Temporal Stochastic Weather Simulation

Spatial statistics, addition to Part I. Parameter estimation and kriging for Gaussian random fields

Paper Review: NONSTATIONARY COVARIANCE MODELS FOR GLOBAL DATA

Hierarchical Modeling for Univariate Spatial Data

Gauge Plots. Gauge Plots JAPANESE BEETLE DATA MAXIMUM LIKELIHOOD FOR SPATIALLY CORRELATED DISCRETE DATA JAPANESE BEETLE DATA

Switching Regime Estimation

Conditional probabilities and graphical models

Available online at ScienceDirect. Procedia Environmental Sciences 27 (2015 ) Spatial Statistics 2015: Emerging Patterns

Package ProbForecastGOP

COMP 551 Applied Machine Learning Lecture 20: Gaussian processes

STATISTICS 174: APPLIED STATISTICS FINAL EXAM DECEMBER 10, 2002

Generalized additive modelling of hydrological sample extremes

Model checking overview. Checking & Selecting GAMs. Residual checking. Distribution checking

High-Order Composite Likelihood Inference for Max-Stable Distributions and Processes

Chapter 4 - Fundamentals of spatial processes Lecture notes

Introduction. Spatial Processes & Spatial Patterns

Continuous Spatial Process Models for Spatial Extreme Values

Using Estimating Equations for Spatially Correlated A

On prediction and density estimation Peter McCullagh University of Chicago December 2004

The Poisson storm process Extremal coefficients and simulation

Overview of Extreme Value Analysis (EVA)

A space-time skew-t model for threshold exceedances

Bayesian dynamic modeling for large space-time weather datasets using Gaussian predictive processes

Modeling the spatial dependence of floods using the Fisher copula

Introduction to Geostatistics

A brief introduction to mixed models

Conditional Simulation of Max-Stable Processes

Hierarchical Modelling for Multivariate Spatial Data

Generating Spatial Correlated Binary Data Through a Copulas Method

Recap. Vector observation: Y f (y; θ), Y Y R m, θ R d. sample of independent vectors y 1,..., y n. pairwise log-likelihood n m. weights are often 1

Semi-parametric estimation of non-stationary Pickands functions

EXACT SIMULATION OF BROWN-RESNICK RANDOM FIELDS

FREQUENTIST BEHAVIOR OF FORMAL BAYESIAN INFERENCE

Bayesian dynamic modeling for large space-time weather datasets using Gaussian predictive processes

Composite Likelihood Estimation

Hierarchical Modelling for Univariate Spatial Data

Parametric Modelling of Over-dispersed Count Data. Part III / MMath (Applied Statistics) 1

Threshold modeling of extreme spatial rainfall

Lecture 13 Fundamentals of Bayesian Inference

Chapter 4 - Fundamentals of spatial processes Lecture notes

MULTIDIMENSIONAL COVARIATE EFFECTS IN SPATIAL AND JOINT EXTREMES

Hidden Markov Models for precipitation

A short introduction to INLA and R-INLA

Learning the Linear Dynamical System with ASOS ( Approximated Second-Order Statistics )

Transcription:

Statistical modelling of spatial extremes using the SpatialExtremes package M. Ribatet University of Montpellier TheSpatialExtremes package Mathieu Ribatet 1 / 39

Rationale for thespatialextremes package The aim of thespatialextremes package is to provide tools for the areal modelling of extreme events. The modelling strategies heavily rely on the extreme value theory and in particular block maxima techniques unless explicitly stated. As a consequence, most often the data used by the package have to be extreme do not pass daily values for instance; the marginal distribution family is fixed, i.e., the generalized extreme value distribution family, but you have hands on how within this family parameters change in space; the process family is fixed, i.e., max-stable, but you have hands on which type of max-stable to use. TheSpatialExtremes package Mathieu Ribatet 2 / 39

0. Max-stable process Spectral characterization Extremal functions 0. About the inner structure of max-stable TheSpatialExtremes package Mathieu Ribatet 3 / 39

Spectral characterization 0. Max-stable process Spectral characterization Extremal functions Z (s)=max i 1 ζ i Y i (s), s X, where {ζ i : i 1} is a Poisson point process on (0, ) with intensity measure dλ(ζ)=ζ 2 dζ and Y i independent copies of a (non-negative) stochastic process such that E{Y (s) + }=1 for all s X. TheSpatialExtremes package Mathieu Ribatet 4 / 39

Spectral characterization 0. Max-stable process Spectral characterization Extremal functions Z (s)=max ϕ Φ ϕ(s), s X, where Φ={ϕ i : i 1} is a Poisson point process on C 0 with an appropriate intensity measure. Z(s) 0 2 4 6 8 10 12 4 2 0 2 4 s TheSpatialExtremes package Mathieu Ribatet 4 / 39

Extremal functions Z(s) 0 2 4 6 8 10 12 4 2 0 2 4 s TheSpatialExtremes package Mathieu Ribatet 5 / 39

Extremal functions Z(s) 0 2 4 6 8 10 12 4 2 0 2 4 s TheSpatialExtremes package Mathieu Ribatet 5 / 39

Extremal functions Z(s) 0 2 4 6 8 10 12 4 2 0 2 4 Hidden are the random functions Φ + = {ϕ + 1,ϕ+ 2,...,ϕ+ } of Φ such that k s ϕ + j (s j )= Z (s j ), j = 1,...,k, (extremal functions), TheSpatialExtremes package Mathieu Ribatet 5 / 39

Extremal functions Z(s) 0 2 4 6 8 10 12 4 2 0 2 4 Hidden are the random functions Φ + = {ϕ + 1,ϕ+ 2,...,ϕ+ } of Φ such that k s ϕ + j (s j )= Z (s j ), j = 1,...,k, (extremal functions), and the random functions ϕ Φ \ Φ +, i.e., satisfying ϕ (s j )< Z (s j ), j = 1,...,k, (sub-extremal functions) TheSpatialExtremes package Mathieu Ribatet 5 / 39

0. Max-stable process descriptive analysis Data format First look Spatial dependence Spatial trends Debrief #1 TheSpatialExtremes package Mathieu Ribatet 6 / 39

Required data 0. Max-stable process Data format First look Spatial dependence Spatial trends Debrief #1 Before introducing more advanced stuffs, let s talk about data format. It is pretty simple Observations A numeric matrix such that each row is one realization of the spatial field or if you prefer one column per site; Coordinates A numeric matrix such that each row is the coordinates of one site or if you prefer the first column is for instance the longitude of all sites, the second one latitude,... > data Valkenburg Ijmuiden De Kooy... 1971 278 NA 360... 1972 334 NA 376... 1973 376 NA 365... 1974 314 NA 304... 1975 278 NA 278... 1976 350 NA 345... 1977 324 NA 298... 1978 298 NA 329... 1979 252 NA 298...... > coord lon lat Valkenburg 4.419 52.165 Ijmuiden 4.575 52.463 De Kooy 4.785 52.924 Schiphol 4.774 52.301 Vlieland 4.942 53.255 Berkhout 4.979 52.644 Hoorn 5.346 53.393 De Bilt 5.177 52.101... TheSpatialExtremes package Mathieu Ribatet 7 / 39

Additional covariates 0. Max-stable process Data format First look Spatial dependence Spatial trends Debrief #1 In addition to the storage of observations and coordinates, you might want to use additional covariates. The latter can be of two types Spatial A numeric matrix such that each column corresponds to one spatial covariate such as elevation, urban/rural,... Temporal A numeric matrix such that each column corresponds to one temporal covariate such as time, annual mean temperature,... > spat.cov alt Valkenburg -0.2 Ijmuiden 4.4 De Kooy 0.5 Schiphol -4.4 Vlieland 0.9 Berkhout -2.5 Hoorn 0.5 De Bilt 2.0... > temp.cov nao 1971 1.87 1972 1.57 1973-0.20 1974-0.95 1975-0.46 1976 2.34 1977-0.49 1978 0.70 1979 1.11... It is always a good idea to name your columns and rows. TheSpatialExtremes package Mathieu Ribatet 8 / 39

Inspecting data 0. Max-stable process Data format First look Spatial dependence Spatial trends Debrief #1 As usual, you first have to scrutinize your data (weird values, encoding of missing values, check out factors,... ). But you re used to that, aren t you? We focus on extremes, so you may wonder are my data extremes, i.e., block maxima? is my block size relevant? what about seasonality? Refine the block or use temporal covariate? You might want to check that the generalized extreme value family is sensible for your data theevd package + a few lines of code will do the job for you (homework) This will generally be OK, but now you have to go a bit further by analyzing the spatial dependence; and the presence / absence of any spatial trends. TheSpatialExtremes package Mathieu Ribatet 9 / 39

Spatial dependence [Cooley et al., 2006] 0. Max-stable process Data format First look Spatial dependence Spatial trends Debrief #1 Essentially you want to check if your data exhibit any (spatial) dependence. If not why would you bother with spatial models? The most convenient way to do this is through the F -madogram and its connection with the extremal coefficient: ν F (h)= 1 E[ F {Z (o)}f{z (h)} ], 2 θ(h)= 1+2ν F (h) 12ν F (h). Thefmadogram function will estimate (empirically) the pairwise extremal coefficent from the F madogram. θ(h)=z logpr{z (s) z, Z (s+ h) z} and that 1 θ(h) 2 with complete dependence iff θ(h)=1 and independence iff θ(h)=2. TheSpatialExtremes package Mathieu Ribatet 10 / 39

Spatial dependence (2) [Dombry et al., 2017] 0. Max-stable process Data format First look Spatial dependence Spatial trends Debrief #1 Another recent summary measure of the spatial dependence is the extremal concurrence probability function p : h p(h) [0,1] where p(h)=pr{!ϕ Φ: ϕ(s)= Z (s), ϕ(s+ h)= Z (s+ h)}, TheSpatialExtremes package Mathieu Ribatet 11 / 39

Spatial dependence (2) [Dombry et al., 2017] 0. Max-stable process Data format First look Spatial dependence Spatial trends Debrief #1 Another recent summary measure of the spatial dependence is the extremal concurrence probability function p : h p(h) [0,1] where p(h)=pr{!ϕ Φ: ϕ(s)= Z (s), ϕ(s+ h)= Z (s+ h)}, i.e., there is a single extremal function at position s and s+ h. p(h)=e[sign{z (s) Z (s)}sign{z (s+ h) Z (s+ h)}] = Kendall s τ, and that 0 p(h) 1 with complete dependence iff p(h) = 1 and independence iff p(h) = 0. TheSpatialExtremes package Mathieu Ribatet 11 / 39

Spatial dependence (2) [Dombry et al., 2017] 0. Max-stable process Data format First look Spatial dependence Spatial trends Debrief #1 Another recent summary measure of the spatial dependence is the extremal concurrence probability function p : h p(h) [0,1] where p(h):= p(s, s+ h)=pr{!ϕ Φ: ϕ(s)= Z (s), ϕ(s+h)= Z (s+h)}, i.e., there is a single extremal function at position s and s+ h. p(h)=e[sign{z (s) Z (s)}sign{z (s+ h) Z (s+ h)}] = Kendall s τ, and that 0 p(h) 1 with complete dependence iff p(h) = 1 and independence iff p(h) = 0. Note that here we assume a stationnary dependence structure! TheSpatialExtremes package Mathieu Ribatet 11 / 39

Thefmadogram function Run the filefmadogram.r. You should get the figure below. ν F (h) 0.04 0.06 0.08 0.10 0.12 0.14 0.16 θ(h) 1.0 1.2 1.4 1.6 1.8 2.0 0 20 40 60 80 100 120 h 0 20 40 60 80 100 120 h Figure 1: Use of thefmadogram function to assess the spatial dependence. TheSpatialExtremes package Mathieu Ribatet 12 / 39

Thefmadogram function Run the filefmadogram.r. You should get the figure below. You can also use a binned version withn.bins = 300... ν F (h) 0.06 0.08 0.10 0.12 θ(h) 1.0 1.2 1.4 1.6 1.8 2.0 0 20 40 60 80 100 h 0 20 40 60 80 100 h Figure 1: Use of thefmadogram function to assess the spatial dependence. TheSpatialExtremes package Mathieu Ribatet 12 / 39

Theconcprob function 0. Max-stable process Data format First look Spatial dependence Spatial trends Debrief #1 Run the fileconcprob.r. You should get the figure below. p(h) 0.0 0.2 0.4 0.6 0.8 1.0 0 20 40 60 80 100 120 h Figure 2: Use of theconcprob function to assess the spatial dependence. TheSpatialExtremes package Mathieu Ribatet 13 / 39

Theconcprob function 0. Max-stable process Data format First look Spatial dependence Spatial trends Debrief #1 Run the fileconcprob.r. You should get the figure below. You can also use a binned version withn.bins = 300... p(h) 0.0 0.2 0.4 0.6 0.8 1.0 0 20 40 60 80 100 h Figure 2: Use of theconcprob function to assess the spatial dependence. TheSpatialExtremes package Mathieu Ribatet 13 / 39

As an aside (AsAnAside.R) [Dombry et al., 2017] We can estimate the spatial distribution of the extremal concurrence probability w.r.t. a given weather station, e.g., plotting { (s, p(zurich, s)): s X }, 0.2 0.4 0.6 0.8 Zurich Bern Davos Lausanne Geneva TheSpatialExtremes package Mathieu Ribatet 14 / 39

As an aside (AsAnAside.R) [Dombry et al., 2017] We can estimate the spatial distribution of the extremal concurrence probability w.r.t. a given weather station, e.g., plotting { (s, p(zurich, s)): s X }, or estimate the expected area of concurrence cells { } A(s 0 )=E 1 {s0 and s are concurrent}ds = X X p(s 0, s)ds 0.2 0.4 0.6 0.8 2200 2400 2600 2800 Zurich Bern Davos Lausanne Geneva TheSpatialExtremes package Mathieu Ribatet 14 / 39

Spatial trends We can do a symbol plot see the filespatialtrends.r. TheSpatialExtremes package Mathieu Ribatet 15 / 39

Spatial trends We can do a symbol plot see the filespatialtrends.r. Zurich Bern Davos Lausanne Geneva Figure 3: Symbol plot for the swiss precipitation data. TheSpatialExtremes package Mathieu Ribatet 15 / 39

Spatial trends We can do a symbol plot see the filespatialtrends.r. Zurich Zurich Zurich Bern Bern Bern Davos Davos Davos Lausanne Lausanne Lausanne Geneva Geneva Geneva Figure 3: Symbol plot for the swiss precipitation data. TheSpatialExtremes package Mathieu Ribatet 15 / 39

Spatial trends We can do a symbol plot see the filespatialtrends.r. Zurich Zurich Zurich Bern Bern Bern Davos Davos Davos Lausanne Lausanne Lausanne Geneva Geneva Geneva Figure 3: Symbol plot for the swiss precipitation data. When exporting figures into eps/pdf, always pay attention to the aspect ratio. TheSpatialExtremes package Mathieu Ribatet 15 / 39

What we have learned so far (apart from usingspatialextremes) 0. Max-stable process Data format First look Spatial dependence Spatial trends Debrief #1 The data exhibit some spatial dependence and there is still some (weak) dependance at a separation lag of 100km. There s a clear north-west / south-east gradient in the intensities of rainfall storms. In conclusion it makes sense to use max-stable whose marginal parameters are not constant across space. More specifically, we have: a clear north-west / south-east gradient for the location and scale parameters; no clear pattern for the shape parameter. TheSpatialExtremes package Mathieu Ribatet 16 / 39

0. Max-stable process 2. Simple max-stable Max-stable models Least squares Pairwise likelihood Model selection Simulation Debrief #2 TheSpatialExtremes package Mathieu Ribatet 17 / 39

Max-stable models 0. Max-stable process Max-stable models Least squares Pairwise likelihood Model selection Simulation Debrief #2 In this section we focus only on the spatial dependence and so assume that the margins are known and unit Fréchet this is a standard choice in extreme value theory. From the spectral characterization Z (s)=max i 1 ζ i Y i (s), s X, we can propose several parametric models for spatial extremes. Hence by letting Y to be Gaussian densities with random displacements we get the Smith process; Gaussian we get the Schlather process; Log-normal (with a drift) we get the Brown Resnick process; Gaussian but elevated to some power we get the Extremal-t process. TheSpatialExtremes package Mathieu Ribatet 18 / 39

Dependence parameters 0. Max-stable process Max-stable models Least squares Pairwise likelihood Model selection Simulation Debrief #2 Smith Elements of the covariance matrix appearing in the Gaussian densities; Schlather Parameters of the correlation function; Brown Resnick Parameters of the semi-variogram; Extremal t Parameters of the correlation function and degrees of freedom. Since the margins are fixed, we only need to get estimates for the dependence parameters. How can we do that? TheSpatialExtremes package Mathieu Ribatet 19 / 39

Least squares (leastsquares.r) [Smith, 1990] arg min ψ Ψ 1 i<j k { θ(s j s j ;ψ) ˆθ(s i s j ) } 2, where θ( ;ψ) is the extremal coefficient obtained from the max-stable model with dependence parameters set to ψ and ˆθ( ) is any empirical estimates of the extremal coefficient, e.g., F madogram based. > M0 Estimator: Least Squares Model: Schlather Weighted: TRUE Objective Value: 3592.429 Covariance Family: Whittle-Matern Estimates Marginal Parameters: Assuming unit Frechet. Dependence Parameters: range smooth 54.3239 0.4026 Optimization Information Convergence: successful Function Evaluations: 61 θ(h) 1.0 1.2 1.4 1.6 1.8 2.0 0 20 40 60 80 100 120 h Figure 4: Fitting simple max-stable from least squares. TheSpatialExtremes package Mathieu Ribatet 20 / 39

Least squares (leastsquares.r) [Smith, 1990] arg min ψ Ψ 1 i<j k { θ(s j s j ;ψ) ˆθ(s i s j ) } 2, where θ( ;ψ) is the extremal coefficient obtained from the max-stable model with dependence parameters set to ψ and ˆθ( ) is any empirical estimates of the extremal coefficient, e.g., F madogram based. > M0 Estimator: Least Squares Model: Schlather Weighted: TRUE Objective Value: 3592.429 Covariance Family: Whittle-Matern Estimates Marginal Parameters: Assuming unit Frechet. Dependence Parameters: range smooth 54.3239 0.4026 Optimization Information Convergence: successful Function Evaluations: 61 θ(h) 1.0 1.2 1.4 1.6 1.8 2.0 0 20 40 60 80 100 120 h θ(h) 1.0 1.2 1.4 1.6 1.8 2.0 0 20 40 60 80 100 120 h Schlather Smith Extremalt BrownResnick Figure 4: Fitting simple max-stable from least squares. TheSpatialExtremes package Mathieu Ribatet 20 / 39

Pairwise likelihood (pairwisellik.r) [Padoan et al., 2010] arg max ψ Ψ n l=1 1 i<j k log f {z l (s i ), z l (s j );ψ}, where f (, ;ψ) is the bivariate density of the considered max-stable model. Estimator: MPLE Model: Schlather Weighted: FALSE Pair. Deviance: 1136863 TIC: 1137456 Covariance Family: Whittle-Matern Estimates Marginal Parameters: Assuming unit Frechet. Dependence Parameters: range smooth 50.1976 0.3713 Standard Errors range smooth 20.7085 0.0789 θ(h) 1.0 1.2 1.4 1.6 1.8 2.0 0 20 40 60 80 100 120 h Asymptotic Variance Covariance range smooth range 428.841018-1.570081 smooth -1.570081 0.006225 Optimization Information Convergence: successful Function Evaluations: 67 Figure 5: Fitting simple max-stable maximizing pairwise likelihood. TheSpatialExtremes package Mathieu Ribatet 21 / 39

Pairwise likelihood (pairwisellik.r) [Padoan et al., 2010] arg max ψ Ψ n l=1 1 i<j k log f {z l (s i ), z l (s j );ψ}, where f (, ;ψ) is the bivariate density of the considered max-stable model. Estimator: MPLE Model: Schlather Weighted: FALSE Pair. Deviance: 1136863 TIC: 1137456 Covariance Family: Whittle-Matern Estimates Marginal Parameters: Assuming unit Frechet. Dependence Parameters: range smooth 50.1976 0.3713 Standard Errors range smooth 20.7085 0.0789 θ(h) 1.0 1.2 1.4 1.6 1.8 2.0 0 20 40 60 80 100 120 h p(h) 0.0 0.2 0.4 0.6 0.8 1.0 0 20 40 60 80 100 120 h Schlather Extremalt BrownResnick Asymptotic Variance Covariance range smooth range 428.841018-1.570081 smooth -1.570081 0.006225 Optimization Information Convergence: successful Function Evaluations: 67 Figure 5: Fitting simple max-stable maximizing pairwise likelihood. TheSpatialExtremes package Mathieu Ribatet 21 / 39

Model Selection [Varin and Vidoni, 2005] 0. Max-stable process Max-stable models Least squares Pairwise likelihood Model selection Simulation Debrief #2 The advantage of the pairwise likelihood estimator over the least squares one is that you can do model selection. For instance one can use the TIC, Takeuchi Information Criterion or sometimes known as CLIC, Composite Likelihood Information Criterion, TIC=2l pairwise ( ˆψ)2tr{J( ˆψ)H 1 ( ˆψ)}, H( ˆψ)=E{ 2 l pairwise (Y ; ˆψ)}, J( ˆψ)=Var{ l pairwise (Y ; ˆψ)}. From our previous fitted models, we get > TIC(M0,M1,M2) M1 M2 M0 1133660 1134823 1137449 TheSpatialExtremes package Mathieu Ribatet 22 / 39

Simulating simple max-stable (simulation.r) [Schlather, 2002; Dombry et al., 2016] 0. Max-stable process Max-stable models Least squares Pairwise likelihood Model selection Simulation Debrief #2 Once you have fitted a suitable model, you usually want to simulate from it. Simulation from max-stable models is rather complex, recall that Z (s)=max i 1 ζ i Y i (s), s X. 1.0 0.8 2.0 1.5 1.0 sim <- rmaxstab(n.obs, cbind(x, y), "twhitmat", DoF = 4, + nugget = 0, range = 3, smooth = 1) > sim [,1] [,2] [,3] [,4] [,5] [1,] 3.8048914 0.4767980 6.3613989 1.4548317 1.0433912 [2,] 1.2200332 0.6711422 0.8078701 2.0928629 0.7537061 [3,] 0.5466466 2.0498561 4.8852572 2.3497976 0.6857268 [4,]... 0.6 0.4 0.2 0.0 0.0 0.2 0.4 0.6 0.8 1.0 0.5 0.0 0.5 1.0 Figure 6: One simulation on a 50 x 50 grid from the extremal t model. (log scale) TheSpatialExtremes package Mathieu Ribatet 23 / 39

What we have learned so far (apart from usingspatialextremes) 0. Max-stable process Max-stable models Least squares Pairwise likelihood Model selection Simulation Debrief #2 The Smith model is clearly not a sensible model for our data because of its linear behaviour near the origin; Schlather, Brown Resnick and Extremal t seems relevant; According to the TIC, the Extremal t should be preferred. TheSpatialExtremes package Mathieu Ribatet 24 / 39

0. Max-stable process Spatial GEV Prediction #1 Model selection #2 Debrief #3 TheSpatialExtremes package Mathieu Ribatet 25 / 39

From generalized extreme value margins to unit Fréchet ones 0. Max-stable process Spatial GEV Prediction #1 Model selection #2 Debrief #3 Alright! We are able to handle the spatial dependence, but we assume that our data have unit Fréchet margins. This is not realistic at all! Fortunately, if Y GEV(µ, σ, ξ) then ( Z = 1+ξ Y µ ) 1/ξ Unit Fréchet=GEV(1,1,1). σ TheSpatialExtremes package Mathieu Ribatet 26 / 39

From generalized extreme value margins to unit Fréchet ones 0. Max-stable process Spatial GEV Prediction #1 Model selection #2 Debrief #3 Alright! We are able to handle the spatial dependence, but we assume that our data have unit Fréchet margins. This is not realistic at all! Fortunately, if Y GEV(µ, σ, ξ) then ( Z = 1+ξ Y µ ) 1/ξ Unit Fréchet=GEV(1,1,1). σ And since we are extreme value and spatial guys { Z (s)= 1+ξ(s) Y (s)µ(s) } 1/ξ(s), s X, σ(s) is a simple max-stable process. Hence we can use the maximum pairwise likelihood estimator as before up to an additional Jacobian term. TheSpatialExtremes package Mathieu Ribatet 26 / 39

Omitting the spatial dependence 0. Max-stable process Spatial GEV Prediction #1 Model selection #2 Debrief #3 With simple max-stable models, we omitted the marginal parameters. Here we will omit the spatial dependence for a while and consider locations as being mutually independent, i.e., use independence likelihood arg max ψ Ψ k l GEV {y(s i );ψ}. i=1 This is a kind of spatial GEV where ψ is a vector of marginal parameters. TheSpatialExtremes package Mathieu Ribatet 27 / 39

Defining trend surfaces 0. Max-stable process Zurich Zurich Zurich Bern Davos Bern Davos Bern Davos Lausanne Lausanne Lausanne Geneva Geneva Geneva Spatial GEV Prediction #1 Model selection #2 Debrief #3 Figure 7: Symbol plot for the swiss precipitation data. This suggests that µ(s)=β 0,µ + β 1,µ lon(s)+β 2,µ lat(x)+β 3,µ lon(s) lat(s), σ(s)=β 0,σ + β 1,σ lon(s)+β 2,σ lat(s)+β 3,σ lon(s) lat(s), ξ(s)=β 0,ξ, or equivalently with therlanguage loc.form <- scale.form <- y ~ lon * lat; shape.form <- y ~ 1 TheSpatialExtremes package Mathieu Ribatet 28 / 39

Fitting the spatial GEV model (spatialgev.r) [Davison et al., 2012] 0. Max-stable process Spatial GEV Prediction #1 Model selection #2 Debrief #3 Model: Spatial GEV model Deviance: 29303.81 TIC: 29499.38 Location Parameters: loccoeff1 loccoeff2 loccoeff3 loccoeff4 27.132 1.846-3.656-1.080 Scale Parameters: scalecoeff1 scalecoeff2 scalecoeff3 scalecoeff4 9.7850 0.7023-1.0858-0.5531 Shape Parameters: shapecoeff1 0.1572 Standard Errors loccoeff1 loccoeff2 loccoeff3 loccoeff4 scalecoeff1 scalecoeff2 1.13326 0.34864 0.45216 0.38361 0.76484 0.28446 scalecoeff3 scalecoeff4 shapecoeff1 0.31267 0.27566 0.05878 Asymptotic Variance Covariance loccoeff1 loccoeff2 loccoeff3 loccoeff4 scalecoeff1 loccoeff1 1.2842711 0.1131400-0.1740921-0.0729564 0.6570988 loccoeff2 0.1131400 0.1215498-0.0623759 0.0149596 0.0521630 loccoeff3-0.1740921-0.0623759 0.2044448 0.0576622-0.1086629 loccoeff4-0.0729564 0.0149596 0.0576622 0.1471593-0.0346376 scalecoeff1 0.6570988 0.0521630-0.1086629-0.0346376 0.5849729... Optimization Information Convergence: successful Function Evaluations: 2135 TheSpatialExtremes package Mathieu Ribatet 29 / 39

Get predictions (predictionspatialgev.r) Zurich Bern Davos Lausanne Geneva Figure 8: Left: symbol plot. Right: Prediction of the pointwise 25-year return levels from a fitted spatial GEV model. TheSpatialExtremes package Mathieu Ribatet 30 / 39

Get predictions (predictionspatialgev.r) Zurich Bern Davos Lausanne Geneva Figure 8: Left: symbol plot. Right: Prediction of the pointwise 25-year return levels from a fitted spatial GEV model. But don t we forget something??? TheSpatialExtremes package Mathieu Ribatet 30 / 39

Get predictions (predictionspatialgev.r) Zurich Bern Davos Lausanne Geneva Figure 8: Left: symbol plot. Right: Prediction of the pointwise 25-year return levels from a fitted spatial GEV model. But don t we forget something??? Model selection? TheSpatialExtremes package Mathieu Ribatet 30 / 39

Model selection #2 (modelselection.r) [Chandler and Bate, 2007; Kent, 1982] 0. Max-stable process Spatial GEV Prediction #1 Model selection #2 Debrief #3 Typically here we would like to test if a given covariate is required or not Hence we re dealing with nested model for which composite likelihood ratio test are especially suited 2{l composite ( ˆψ)l composite ( ˆφ λ0,λ 0 )} Eigenvalue(s): 2.7 1.95 Analysis of Variance Table MDf Deviance Df Chisq Pr(> sum lambda Chisq) M2 7 29328 M0 9 29306 2 22.265 0.008273 ** --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05. 0.1 1 p j=1 λ j X i, n. Always check that your models are nested. The code won t do that for you! TheSpatialExtremes package Mathieu Ribatet 31 / 39

What we have learned so far (apart from usingspatialextremes) 0. Max-stable process Spatial GEV Prediction #1 Model selection #2 Debrief #3 Based on thespatial GEV model, we identify what seems to be relevant trend surfaces for the marginal parameters: µ(s)=β 0,µ + β 1,µ lon(s)+β 2,µ lat(s)+β 3,µ lon(s)lat(s), σ(s)=β 0,σ + β 1,σ lon(s)+β 2,σ lat(s), ξ(s)=β 0,ξ, TheSpatialExtremes package Mathieu Ribatet 32 / 39

0. Max-stable process Fitting 4. General max-stable Model checking [Davison et al., 2012] Predictions (simulationfinal.r) TheSpatialExtremes package Mathieu Ribatet 33 / 39

Fitting a max-stable process with trend surfaces Now it s time to combine everything, i.e., trend surfaces + dependence. The syntax won t be a big surprise M0 <- fitmaxstab(rain, coord[,1:2], "twhitmat", nugget = 0, loc.form, scale.form, shape.form) Estimator: MPLE Model: Extremal-t Weighted: FALSE Pair. Deviance: 2237562 TIC: 2249206 Covariance Family: Whittle-Matern Estimates Marginal Parameters: Location Parameters: loccoeff1 loccoeff2 loccoeff3 loccoeff4 27.136295 0.060145-0.164755-0.001117 Scale Parameters: scalecoeff1 scalecoeff2 scalecoeff3 9.88857 0.02869-0.04581 Shape Parameters: shapecoeff1 0.1727 Dependence Parameters: range smooth DoF 225.9452 0.3645 4.1566... TheSpatialExtremes package Mathieu Ribatet 34 / 39

Model checking [Davison et al., 2012] When you want to check your fitted max-stable model, you usually want to check if observations at each single location are well modelled: return level plot; the dependence is well captured: extremal coefficient function. Observed Observed Return level 0 2 4 6 8 0 2 4 6 8 50 100 150 1 2 5 10 50 Return Period h = 48.03 1 1 2 3 4 5 Model h = 59.24 1 1 2 3 4 5 Model lat Return level Observed 220 260 50 100 200 0 2 4 6 8 3 4 1 2 660 700 740 lon 1 2 5 10 50 Return Period h = 62.23 1 1 2 3 4 5 Model θ(h) Return level 1.0 1.2 1.4 1.6 1.8 2.0 50 100 150 0 20 40 60 80 100 120 1 2 5 10 50 Return Period Observed h 0 2 4 6 8 0 1 2 3 4 5 Model This can be done using a single line of code Observed 0 2 4 6 8 h = 61.27 Observed 2 0 2 4 6 8 h = 35.95 Observed 2 0 2 4 6 8 h = 35.21 Return level 50 100 200 1 1 2 3 4 5 1 1 2 3 4 5 1 1 2 3 4 5 1 2 5 10 50 Model Model Model Return Period > plot(m0) Figure 9: Model checking for a fitted max-stable process having trend surfaces. TheSpatialExtremes package Mathieu Ribatet 35 / 39

Predictions (simulationfinal.r) Prediction works as for the spatial GEV model thanks to thepredict function. But beware these predictions are pointwise no spatial dependence at all!!! If you want to do take into account spatial dependence then you need to simulate from your fitted model. Figure 10: One simulation from our fitted extremal t model with trend surfaces. TheSpatialExtremes package Mathieu Ribatet 36 / 39

0. Max-stable process References TheSpatialExtremes package Mathieu Ribatet 37 / 39

What we haven t seen Using weighted pairwise likelihood; Many (many!) utility functions. Highly recommended to have a look at the documentation; The package has a vignette:vignette("spatialextremesguide"); Copula models although I do not recommend their use for spatial extremes; Bayesian hierarchical models; Unconditional simulations: several implementations (including exact simulations) Conditional simulations really CPU demanding. TheSpatialExtremes package Mathieu Ribatet 38 / 39

What we haven t seen Using weighted pairwise likelihood; Many (many!) utility functions. Highly recommended to have a look at the documentation; The package has a vignette:vignette("spatialextremesguide"); Copula models although I do not recommend their use for spatial extremes; Bayesian hierarchical models; Unconditional simulations: several implementations (including exact simulations) Conditional simulations really CPU demanding. A rather recent review on max-stable with R code is given by Ribatet [2013] THANK YOU! TheSpatialExtremes package Mathieu Ribatet 38 / 39

References Chandler, R. E. and Bate, S. (2007). Inference for clustered data using the independence loglikelihood. Biometrika, 94(1):167 183 Cooley, D., Naveau, P., and Poncet, P. (2006). Variograms for spatial max-stable random fields. In Bertail, P., Soulier, P., Doukhan, P., Bickel, P., Diggle, P., Fienberg, S., Gather, U., Olkin, I., and Zeger, S., editors, Dependence in Probability and Statistics, volume 187 of Lecture Notes in Statistics, pages 373 390. Springer New York Davison, A., Padoan, S., and Ribatet, M. (2012). Statistical modelling of spatial extremes. Statistical Science, 7(2):161 186 Dombry, C., Engelke, S., and Oesting, M. (2016). Exact simulation of max-stable. Biometrika, 103(2):303 317 Dombry, C., Ribatet, M., and Stoev, S. (2017). Probabilities of concurrent extremes. To appear in Journal of the American Statistical Association (Theory & Methods) Padoan, S., Ribatet, M., and Sisson, S. (2010). Likelihood-based inference for max-stable. Journal of the American Statistical Association (Theory & Methods), 105(489):263 277 Ribatet, M. (2013). Spatial extremes: Max-stable at work. Journal de la Société Française de Statistique, 154(2):156 177 Schlather, M. (2002). Models for stationary max-stable random fields. Extremes, 5(1):33 44 Smith, R. L. (1990). Max-stable and spatial extreme. Unpublished manuscript Varin, C. and Vidoni, P. (2005). A note on composite likelihood inference and model selection. Biometrika, 92(3):519 528 TheSpatialExtremes package Mathieu Ribatet 39 / 39