S3 alogLik method to perform loglikelihood adjustment for fitted extreme value model objects returned from fitGPD function in the POT package. The model must have been fitted using maximum likelihood estimation.

# S3 method for uvpot
alogLik(x, cluster = NULL, use_vcov = TRUE, ...)

Arguments

x

A fitted model object with certain associated S3 methods. See Details.

cluster

A vector or factor indicating from which cluster the respective log-likelihood contributions from loglik originate. The length of cluster must be consistent with the estfun method to be used in the estimation of the 'meat' V of the sandwich estimator of the covariance matrix of the parameters to be passed to adjust_loglik. In most cases, cluster must have length equal to the number of observations in data. The exception is the GP (only) model (binom = FALSE), where the cluster may either contain a value for each observation in the raw data, or for each threshold exceedance in the data.

If cluster is not supplied (is NULL) then it is assumed that each observation forms its own cluster. See Details for further details.

use_vcov

A logical scalar. Should we use the vcov S3 method for x (if this exists) to estimate the Hessian of the independence loglikelihood to be passed as the argument H to adjust_loglik? Otherwise, H is estimated inside adjust_loglik using optimHess.

...

Further arguments to be passed to the functions in the sandwich package meat (if cluster = NULL), or meatCL (if cluster is not NULL).

Value

An object inheriting from class "chandwich". See

adjust_loglik.

class(x) is c("lax", "chandwich", "POT", "pot", "gpd").

Details

See alogLik for details.

References

Chandler, R. E. and Bate, S. (2007). Inference for clustered data using the independence loglikelihood. Biometrika, 94(1), 167-183. doi:10.1093/biomet/asm015

Suveges, M. and Davison, A. C. (2010) Model misspecification in peaks over threshold analysis, The Annals of Applied Statistics, 4(1), 203-221. doi:10.1214/09-AOAS292

Zeileis (2006) Object-Oriented Computation and Sandwich Estimators. Journal of Statistical Software, 16, 1-16. doi:10.18637/jss.v016.i09

See also

alogLik: loglikelihood adjustment for model fits.

Examples

# We need the POT package
got_POT <- requireNamespace("POT", quietly = TRUE)
#> Registered S3 methods overwritten by 'POT':
#>   method      from
#>   print.bvpot evd 
#>   plot.bvpot  evd 

if (got_POT) {
  library(POT)
  # An example from the POT::fitgpd documentation.
  set.seed(4082019)
  x <- POT::rgpd(200, 1, 2, 0.25)
  fit <- fitgpd(x, 1, "mle")
  adj_fit <- alogLik(fit)
}
#> 
#> Attaching package: 'POT'
#> The following objects are masked from 'package:fExtremes':
#> 
#>     dgpd, pgpd, qgpd, rgpd
#> The following objects are masked from 'package:evir':
#> 
#>     dgpd, pgpd, qgpd, rgpd
#> The following objects are masked from 'package:eva':
#> 
#>     dgpd, pgpd, qgpd, rgpd
#> The following object is masked from 'package:extRemes':
#> 
#>     mrlplot
#> The following objects are masked from 'package:evd':
#> 
#>     dens, dgpd, exiplot, mrlplot, pgpd, pp, qgpd, qq, rgpd, tcplot