Package spatialtaildep

Similar documents
Package pnmtrem. February 20, Index 9

Package hsiccca. February 20, 2015

Package mgc. April 13, 2018

Package dkdna. June 1, Description Compute diffusion kernels on DNA polymorphisms, including SNP and bi-allelic genotypes.

Package quadprogxt. February 4, 2018

Package samplesizelogisticcasecontrol

Package sglr. February 20, 2015

Package geofd. R topics documented: October 5, Version 1.0

Package ssa. July 24, 2016

Package tseriesentropy

Package kdetrees. February 20, 2015

Package gsscopu. R topics documented: July 2, Version Date

Package CausalGAM. October 19, 2017

Note Set 4: Finite Mixture Models and the EM Algorithm

Package nsprcomp. August 29, 2016

Package esabcv. May 29, 2015

Package Numero. November 24, 2018

Package robustreg. R topics documented: April 27, Version Date Title Robust Regression Functions

Package pendvine. R topics documented: July 9, Type Package

Package RaPKod. February 5, 2018

Package gibbs.met. February 19, 2015

Package ConvergenceClubs

Package permuco. February 14, Type Package

Package DPBBM. September 29, 2016

Package CoImp. August 8, 2016

Package alphastable. June 15, 2018

Package gee. June 29, 2015

Package TANDEM. R topics documented: June 15, Type Package

Package StVAR. February 11, 2017

Package npcp. August 23, 2017

Package snn. August 23, 2015

Package cwm. R topics documented: February 19, 2015

Package mixsqp. November 14, 2018

Package seg. February 15, 2013

Package gwrr. February 20, 2015

Package ccapp. March 7, 2016

Package mvpot. R topics documented: April 9, Type Package

Package sfc. August 29, 2016

Package mvprobit. November 2, 2015

Package EBglmnet. January 30, 2016

Package missforest. February 15, 2013

Package gpr. February 20, 2015

The ICSNP Package. October 5, 2007

Package MicroStrategyR

Package bgeva. May 19, 2017

Package mmtsne. July 28, 2017

Package mnormt. April 2, 2015

Package approximator

Package RPMM. August 10, 2010

Package marqlevalg. February 20, 2015

Package LINselect. June 9, 2018

Package SoftClustering

Package edrgraphicaltools

Package GenSA. R topics documented: January 17, Type Package Title Generalized Simulated Annealing Version 1.1.

Package SiZer. February 19, 2015

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

Package extweibquant

NONPARAMETRIC REGRESSION SPLINES FOR GENERALIZED LINEAR MODELS IN THE PRESENCE OF MEASUREMENT ERROR

Package KRMM. R topics documented: June 3, Type Package Title Kernel Ridge Mixed Model Version 1.0 Author Laval Jacquin [aut, cre]

Package datasets.load

Package GWRM. R topics documented: July 31, Type Package

Machine Learning. Topic 5: Linear Discriminants. Bryan Pardo, EECS 349 Machine Learning, 2013

Package sensory. R topics documented: February 23, Type Package

Package bayesdccgarch

Package exporkit. R topics documented: May 5, Type Package Title Expokit in R Version Date

Package LVGP. November 14, 2018

Package hiernet. March 18, 2018

Package RaschSampler

Package penrvine. R topics documented: May 21, Type Package

Package gpdtest. February 19, 2015

Package clusternomics

Package RSNPset. December 14, 2017

Instance-based Learning

Package cgh. R topics documented: February 19, 2015

Package Bergm. R topics documented: September 25, Type Package

Package smoothmest. February 20, 2015

Package Segmentor3IsBack

Package GauPro. September 11, 2017

Package AnDE. R topics documented: February 19, 2015

Package EFS. R topics documented:

Package seg. September 8, 2013

Package BayesCR. September 11, 2017

Package sbf. R topics documented: February 20, Type Package Title Smooth Backfitting Version Date Author A. Arcagni, L.

Package dissutils. August 29, 2016

Package Rtsne. April 14, 2017

Package milr. June 8, 2017

Package OLScurve. August 29, 2016

Package fastsom. February 15, 2013

Package anidom. July 25, 2017

Package subtype. February 20, 2015

Package ICSOutlier. February 3, 2018

Package RCA. R topics documented: February 29, 2016

Package glassomix. May 30, 2013

Introduction to the R Statistical Computing Environment R Programming: Exercises

Package midastouch. February 7, 2016

Package MeanShift. R topics documented: August 29, 2016

Package ihs. February 25, 2015

Package bayescl. April 14, 2017

Package DCEM. September 30, 2018

Package dirmcmc. R topics documented: February 27, 2017

Transcription:

Package spatialtaildep Title Estimation of spatial tail dependence models February 20, 2015 Provides functions implementing the pairwise M-estimator for parametric models for stable tail dependence functions described in ``An M-estimator of spatial tail dependence'' (Einmahl, J.H.J., Kiriliouk, A., Krajina, A. and Segers, J., 2014). See http://arxiv.org/abs/1403.1975. Version 1.0.2 Author Anna Kiriliouk, Johan Segers Maintainer Anna Kiriliouk <anna.kiriliouk@uclouvain.be> Depends R (>= 3.0.1), cubature, mvtnorm, SpatialExtremes License GPL-3 LazyData true Collate 'tailintemp.r' 'gridutilities.r' 'EstimationSmith.r' 'EstimationBR.r' 'Estimation.R' 'spatialtaildep-package.r' NeedsCompilation yes Repository CRAN Date/Publication 2014-11-18 16:23:30 R topics documented: AsymVar.......................................... 2 KNMIdata.......................................... 3 Mestimator......................................... 4 paircoordinates....................................... 6 selectpairindices...................................... 7 spatialtaildep........................................ 7 tailint............................................ 8 tailintemp.......................................... 9 Index 11 1

2 AsymVar AsymVar Function AsymVar Function to compute the asymptotic variance matrix of the pairwise M-estimator for the Smith model or the Brown-Resnick process. AsymVar(pairs, model, theta, Tol = 1e-05) pairs model theta Tol A q x 4 matrix giving the Cartesian coordinates of the q pairs of locations. Choose between "smith" and "BR". Parameter vector. For the Smith model, theta must be equal to the 2 x 2 covariance matrix. For the Brown-Resnick pocess, theta = (α, ρ, β, c). The tolerance in the numerical integration procedure. Defaults to 1e-5. Details For a matrix of coordinates of pairs of locations, this function returns the asymptotic variance matrix of the estimator. An optimal weight matrix can be defined as the inverse of the asymptotic variance matrix. For a detailed description of this procedure, see Einmahl et al. (2014). The parameter vector theta must be a positive semi-definite matrix if model = "smith" and a vector of length four if model = "BR", where 0 < α < 1, ρ > 0, 0 < β π/2 and c > 0. A q x q matrix. Einmahl, J.H.J., Kiriliouk, A., Krajina, A. and Segers, J. (2014), "An M-estimator of spatial tail dependence". See http://arxiv.org/abs/1403.1975. Mestimator, selectpairindices, paircoordinates

KNMIdata 3 ## Define the locations of three stations (locations <- rbind(c(1.0,1.0),c(2.0,1.0),c(1.2,2.5))) ## select pairs (pairindices <- selectpairindices(locations, maxdistance = 3)) (pairs <- paircoordinates(locations, pairindices)) ## Smith model parameter matrix (theta <- rbind(c(1.5,.5), c(.5, 1))) ## The matrix. Takes a couple of seconds to compute. ## AsymVar(pairs, model = "smith", theta = theta, Tol = 1e-04) ## Parameters of the Brown-Resnick process (theta <- c(1.5,1,0.5,0.25)) ## The matrix. Takes a couple of seconds to compute. ## AsymVar(pairs, model = "BR", theta = theta, Tol = 1e-04) KNMIdata Wind speeds in the Netherlands. Format Source Daily maximal speeds of wind gusts, measured in 0.1 m/s. The data are observed at 22 inland weather stations in the Netherlands. Only the summer months are presented here (June, July, August). Also included are the Euclidian coordinates of the 22 weather stations, where a distance of 1 corresponds to 100 kilometers. For more information on this dataset, see Einmahl et al. (2014). KNMIdata$data is a matrix with 672 rows and 22 columns, KNMI$loc is a matrix with 22 rows and 2 columns. http://www.knmi.nl/climatology/daily_data/selection.cgi Einmahl, J.H.J., Kiriliouk, A., Krajina, A. and Segers, J. (2014), "An M-estimator of spatial tail dependence". See http://arxiv.org/abs/1403.1975. data(knmidata) locations <- KNMIdata$loc pairindices <- selectpairindices(locations, maxdistance = 0.5) Mestimator(KNMIdata$data, locations, pairindices, k = 60, model="br", iterate=false, covmat = FALSE)$theta

4 Mestimator Mestimator Function Mestimator Function to compute the pairwise M-estimator for the parameters of the Smith model or the Brown- Resnick process. Mestimator(x, locations, pairindices, k, model, Tol = 1e-05, starting = NULL, Omega = diag(nrow(pairindices)), iterate = TRUE, covmat = TRUE) x locations pairindices k model An n x d data matrix. A d x 2 matrix containing the Cartesian coordinates of d points in the plane. A q x 2 matrix containing the indices of q pairs of points from the matrix locations. The threshold parameter in the definition of the empirical stable tail dependence function. Choose between "smith" and "BR". Tol The tolerance parameter in the numerical integration procedure; defaults to 1e- 05. starting Omega iterate covmat Initial value of the parameters in the minimization routine. Defaults to diag(2) for the Smith model and (1, 1.5, 0.75, 0.75) for the BR process. A q x q matrix specifying the metric with which the distance between the parametric and nonparametric estimates will be computed. The default is the identity matrix, i.e., the Euclidean metric. A Boolean variable. If TRUE (the default), then the estimator is calculated twice, first with Omega specified by the user, and then a second time with the optimal Omega calculated at the initial estimate. A Boolean variable. If TRUE (the default), the covariance matrix is calculated. Details For a detailed description of the estimation procedure, see Einmahl et al. (2014). Some tips for using this function: n versus d: if the number of locations d is small (d < 8 say), a sufficiently large sample size (eg n > 2000) is needed to obtain a satisfying result, especially for the Brown-Resnick process. However, if d is large, a sample size of n = 500 should suffice.

Mestimator 5 pairindices: if the number of pairs q is large, Mestimator will be rather slow. This is due to the calculation of Omega and covmat. Setting iterate = FALSE and covmat = FALSE will make this procedure fast even for several hundreds of pairs of locations. Tol: the tolerance parameter is used when calculating the three- and four-dimensional integrals in the asymptotic covariance matrix (see Appendix B in Einmahl et al. (2014)). A tolerance of 1e-04 often suffices, although the default tolerance is a safer choice. Starting: for the Smith model, the estimator usually doesn t depend on the starting value at all. For the Brown-Resnick process, it is advised to try a couple of starting values if d is very small, preferably a starting value with c < 1 and one with c > 1. iterate: if iterate = TRUE, the matrix Omega is calculated. This weight matrix tends to have a larger effect when d is large and/or when the Smith model is used. covmat: if the resulting covariance matrix is incorrect (eg negative diagonal values), then Tol is set too high. For the Smith model, the order of the parameters is (σ 11, σ 22, σ 12 ). A list with the following components: theta theta_pilot covmatrix Omega The estimator with estimated optimal weight matrix. The estimator without the optimal weight matrix. The estimated covariance matrix for the estimator. The weight matrix with which the estimator was calculated. Einmahl, J.H.J., Kiriliouk, A., Krajina, A. and Segers, J. (2014), "An M-estimator of spatial tail dependence". See http://arxiv.org/abs/1403.1975. selectpairindices, paircoordinates ## define the locations of 4 stations (locations <- rbind(c(1,1),c(2,1),c(1,2),c(2,2))) ## select the pairs of locations; here, we select all locations (pairindices <- selectpairindices(locations, maxdistance = 2)) ## We use the rmaxstab function from the package SpatialExtremes to ## simulate from the Smith and the Brown-Resnick process. ## The Smith model set.seed(2) x<-rmaxstab(n = 5000, coord = locations,cov.mod="gauss",cov11=1,cov22=2,cov12=0.5) ## calculate the pairwise M-estimator. This may take up to one minute or longer. ## Mestimator(x, locations, pairindices, 100, model="smith",tol = 5e-04) ## The Brown-Resnick process

6 paircoordinates set.seed(2) x <- rmaxstab(n = 5000, coord = locations, cov.mod = "brown", range = 3, smooth = 1) ## We can only simulate isotropic processes with rmaxstab, so we multiply the coordinates ## of the locations with V^(-1) (beta,c). Here we choose beta = 0.25 and c = 1.5 (Vmat<-matrix(c(cos(0.25),1.5*sin(0.25),-sin(0.25),1.5*cos(0.25)),nrow=2)) (locationsaniso <- locations %*% t(solve(vmat))) ## calculate the pairwise M-estimator. This may take up to one minute or longer. ## Mestimator(x, locationsaniso, pairindices, 300, model="br",tol = 5e-04) paircoordinates Function paircoordinates Given a matrix of coordinates of locations and a matrix of indices of pairs of locations, returns a matrix with the coordinates of the pairs of locations. paircoordinates(locations, pairindices) locations pairindices A d x 2 matrix containing the Cartesian coordinates of d points in the plane. A q x 2 matrix containing the indices of q pairs of points. A q x 4 matrix, where each row gives the Cartesian coordinates of the two locations in the corresponding pair. selectpairindices (locations<-cbind(rep(1:2,3),rep(1:3,each=2))) (pairs <- selectpairindices(locations, maxdistance = 1.5)) paircoordinates(locations, pairs)

selectpairindices 7 selectpairindices Function selectpairindices Out of a list of locations given by their Cartesian coordinates, selects pairs of locations with a distance as a criterion. selectpairindices(locations, maxdistance = NULL, numberofpairs = NULL) locations maxdistance numberofpairs A d x 2 matrix containing the Cartesian coordinates of d points in the plane. Pairs of locations with distance not larger than maxdistance will be selected. If NULL, then the selection is made based on numberofpairs. The number of pairs that will be selected, taking distance as a criterion, with closer pairs being selected. It will return more pairs if there are several equidistant locations. A matrix with q rows and 2 columns, where q denotes the number of pairs selected. Each row contains the indices of the corresponding pair of selected locations in the input argument locations. paircoordinates (locations<-cbind(rep(1:4,5),rep(1:5,each=4))) selectpairindices(locations, maxdistance = 1.5) spatialtaildep spatialtaildep The package spatialtaildep provides functions implementing the pairwise M-estimator of parametric spatial tail dependence models for distributions attracted to a max-stable law. This is a rank-based estimator, constructed as the minimizer of the distance between a vector of integrals of parametric pairwise tail dependence functions and the vector of their empirical counterparts. It is especially suited for high-dimensional data since it relies on bivariate margins only and, as a consequence of the rank-based approach, the univariate marginal distributions need not be estimated. For a complete description of the pairwise M-estimator, see Einmahl et al. (2014).

8 tailint Details Currently, this package allows for estimation of the Brown-Resnick process and the Gaussian extreme value process (usually known as the Smith model) in two-dimensional space. The main function of this package is Mestimator, but several other functions are exported as well: tailint returns the integral of a parametric bivariate stable tail dependence function over the unit square, tailintemp returns the integral of the bivariate empirical stable tail dependence function over the unit square, and AsymVar returns the asymptotic variance matrix for a list of pairs of locations defined by the user. The function Mestimator combines these functions: first it computes a pilot estimator based on the Euclidian distance between the integrals of the parametric and the empirical stable tail dependence functions, then it calculates a weight matrix, defined as the inverse of the asymptotic variance matrix in the pilot estimator, and finally it returns the estimator obtained by replacing the Euclidian distance by a quadratic form based on the weight matrix. More details about this procedure can be found in Einmahl et al (2014). The package exports two auxiliary functions as well: the function selectpairindices returns a list of pair indices of locactions, based on either a maximum-distance criterion or on the maximal number of pairs that the user wants to include. Next, the function paircoordinates can be used to select the pairs with these indices from a list of location coordinates. Einmahl, J.H.J., Kiriliouk, A., Krajina, A. and Segers, J., "An M-estimator of spatial tail dependence". See http://arxiv.org/abs/1403.1975. ## get a list of all help files of user-visible functions in the package help(package = spatialtaildep) tailint Function tailint Integral of the bivariate parametric stable tail dependence function over the unit square, for the Smith model or the Brown-Resnick process. tailint(loc, model, theta) loc model theta A 2 x 2 matrix, where a row represents a location. Choose between "smith" and "BR". Parameter vector. For the Smith model, theta must be equal to the 2 x 2 covariance matrix. For the Brown-Resnick pocess, theta = (α, ρ, β, c).

tailintemp 9 Details This is an analytic implementation of the integral of the stable tail dependence function, which is much faster than numerical integration. For the definitions of the parametric stable tail dependence functions, see Einmahl et al. (2014). The parameter vector theta must be a positive semi-definite matrix if model = "smith" and a vector of length four if model = "BR", where 0 < α < 1, ρ > 0, 0 < β π/2 and c > 0. A scalar. Einmahl, J.H.J., Kiriliouk, A., Krajina, A. and Segers, J. (2014), "An M-estimator of spatial tail dependence". See http://arxiv.org/abs/1403.1975. Mestimator, tailintemp tailint(loc = cbind(c(1,1),c(2,3)), model = "smith", theta = rbind(c(3,1),c(1,2))) tailint(loc = cbind(c(1,2),c(3,4)), model = "BR", theta = c(1.5,1,0.5,0.75)) tailintemp Function tailintemp Integral of the bivariate empirical stable tail dependence function over the unit square. tailintemp(ranks, n = nrow(ranks), k) ranks n k A n x 2 matrix, where each column is a permutation of the integers 1:n, representing the ranks computed from a sample of size n. The sample size. If not specified, it is computed as the number of rows of the matrix ranks. The threshold parameter in the definition of the empirical stable tail dependence function. An integer between 1 and n-1.

10 tailintemp Details This is an analytic implementation of the integral of the stable tail dependence function, which is much faster than numerical integration. See Einmahl et al. (2014) for a definition of the empirical stable tail dependence function. A scalar. Einmahl, J.H.J., Kiriliouk, A., Krajina, A. and Segers, J. (2014), "An M-estimator of spatial tail dependence". See http://arxiv.org/abs/1403.1975. Mestimator, tailint n <- 20 (ranks <- cbind(sample(1:n), sample(1:n))) tailintemp(ranks, k = 5)

Index AsymVar, 2, 8 KNMIdata, 3 Mestimator, 2, 4, 8 10 paircoordinates, 2, 5, 6, 7, 8 selectpairindices, 2, 5, 6, 7, 8 spatialtaildep, 7 spatialtaildep-package (spatialtaildep), 7 tailint, 8, 8, 10 tailintemp, 8, 9, 9 11