fExtremes {lax} | R Documentation |
Loglikelihood adjustment for fExtremes fits
Description
S3 alogLik
method to perform loglikelihood adjustment for fitted
extreme value model objects returned from the functions
gevFit
,
gumbelFit
and
gpdFit
in the fExtremes
package.
The model must have been fitted using maximum likelihood estimation.
Usage
## S3 method for class 'fGEVFIT'
alogLik(x, cluster = NULL, use_vcov = TRUE, ...)
## S3 method for class 'fGPDFIT'
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 If |
use_vcov |
A logical scalar. Should we use the |
... |
Further arguments to be passed to the functions in the
sandwich package |
Details
See alogLik
for details.
Value
An object inheriting from class "chandwich"
. See
adjust_loglik
.
class(x)
is a vector of length 5. The first 3 components are
c("lax", "chandwich", "fExtremes")
.
The remaining 2 components depend on the model that was fitted.
If gevFit
or
gumbelFit
was used then these
components are c("gev", "stat")
.
If gpdFit
was used then these
components are c("gpd", "stat")
.
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 fExtremes package
got_fExtremes <- requireNamespace("fExtremes", quietly = TRUE)
if (got_fExtremes) {
library(fExtremes)
# GEV
# An example from the fExtremes::gevFit documentation
set.seed(4082019)
x <- fExtremes::gevSim(model = list(xi=0.25, mu=0, beta=1), n = 1000)
# Fit GEV distribution by maximum likelihood estimation
fit <- fExtremes::gevFit(x)
adj_fit <- alogLik(fit)
summary(adj_fit)
# GP
# An example from the fExtremes::gpdFit documentation
# Simulate GP data
x <- fExtremes::gpdSim(model = list(xi = 0.25, mu = 0, beta = 1), n = 1000)
# Fit GP distribution by maximum likelihood estimation
fit <- fExtremes::gpdFit(x, u = min(x))
adj_fit <- alogLik(fit)
summary(adj_fit)
}