# anova: Anova Tables In SpatialExtremes: Modelling Spatial Extremes

## Description

Computes analysis of deviance for objects of class 'maxstab' or 'spatgev'.

## Usage

 ```1 2 3 4``` ```## S3 method for class 'maxstab' anova(object, object2, method = "RJ", square = "chol", ...) ## S3 method for class 'spatgev' anova(object, object2, method = "RJ", square = "chol", ...) ```

## Arguments

 `object, object2` Two objects of class 'maxstab' or 'spatgev'. `method` Character string. Must be one of "CB" or "RJ" for the Chandler and Bate or the Rotnitzky and Jewell approaches respectively. See function `profile`. `square` The choice for the matrix square root. This is only useful for the 'CB' method. Must be one of 'chol' (Cholesky) or 'svd' (Singular Value Decomposition). `...` Other options to be passed to the `anova` function.

## Details

As ”maxstab” objects are fitted using pairwise likelihood, the model is misspecified. As a consequence, the likelihood ratio statistic is no longer χ^2 distributed. To compute the anova table, we use the methodology proposed by Rotnitzky and Jewell to adjust the distribution of the likelihood ratio statistic.

## Value

This function returns an object of class anova. These objects represent analysis-of-deviance tables.

Mathieu Ribatet

## References

Chandler, R. E. and Bate, S. (2007) Inference for clustered data using the independence loglikelihood Biometrika, 94, 167–183.

Rotnitzky, A. and Jewell, N. (1990) Hypothesis testing of regression parameters in semiparametric generalized linear models for cluster correlated data. Biometrika 77, 485–497.

`fitmaxstab`, `fitspatgev`, `profile`, `TIC`

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31``` ```##Define the coordinates of each location n.site <- 30 locations <- matrix(rnorm(2*n.site, sd = sqrt(.2)), ncol = 2) colnames(locations) <- c("lon", "lat") ##Simulate a max-stable process - with unit Frechet margins data <- rmaxstab(50, locations, cov.mod = "gauss", cov11 = 100, cov12 = 25, cov22 = 220) ##Now define the spatial model for the GEV parameters param.loc <- -10 + 2 * locations[,2] param.scale <- 5 + 2 * locations[,1] + locations[,2]^2 param.shape <- rep(0.2, n.site) ##Transform the unit Frechet margins to GEV for (i in 1:n.site) data[,i] <- frech2gev(data[,i], param.loc[i], param.scale[i], param.shape[i]) ##Define three models for the GEV margins to be fitted loc.form <- loc ~ lat scale.form <- scale ~ lon + I(lat^2) shape.form <- shape ~ lon M0 <- fitspatgev(data, locations, loc.form, scale.form, shape.form) M1 <- fitspatgev(data, locations, loc.form, scale.form, shape.form, shapeCoeff2 = 0) ##Model selection anova(M0, M1) anova(M0, M1, method = "CB", square = "svd") ```

### Example output

```Eigenvalue(s): 0.3

Analysis of Variance Table
MDf Deviance Df  Chisq Pr(> sum lambda Chisq)
M1   6    10203
M0   7    10203  1 0.2917                 0.3272
Analysis of Variance Table
MDf Deviance Df  Chisq Pr(> sum lambda Chisq)
M1   6   799.19
M0   7   798.40  1 0.7889                 0.3744
```

SpatialExtremes documentation built on May 2, 2019, 5:45 p.m.