Last chance! 50% off unlimited learning
Sale ends in
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, ...)
A fitted model object with certain associated S3 methods. See Details.
A vector or factor indicating from which cluster the
respective loglikelihood contributions from loglik
originate.
This must have the same length as the vector returned by the
logLikVec
method for an object like x
.
If cluster
is not supplied (i.e. is NULL
) then it is
assumed that each observation forms its own cluster.
See Details.
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
.
An object inheriting from class "chandwich"
. See
adjust_loglik
.
class(x)
is c("lax", "chandwich", "POT", "pot", "gpd")
.
See alogLik
for details.
Chandler, R. E. and Bate, S. (2007). Inference for clustered data using the independence loglikelihood. Biometrika, 94(1), 167-183. http://doi.org/10.1093/biomet/asm015
Zeleis (2006) Object-Oriented Computation and Sandwich Estimators. Journal of Statistical Software, 16, 1-16. http://doi.org/10.18637/jss.v016.i09
alogLik
: loglikelihood adjustment for model fits.
# NOT RUN {
# We need the POT package
got_POT <- requireNamespace("POT", quietly = TRUE)
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)
}
# }
Run the code above in your browser using DataLab