| evir {lax} | R Documentation |
Loglikelihood adjustment for evir fits
Description
S3 alogLik method to perform loglikelihood adjustment for fitted
extreme value model objects returned from the functions
gev, gpd and pot
in the evir package.
If x was returned from pot then the model will
need to be re-fitted using pot_refit.
Usage
## S3 method for class 'gev'
alogLik(x, cluster = NULL, use_vcov = TRUE, ...)
## S3 method for class 'gpd'
alogLik(x, cluster = NULL, use_vcov = TRUE, ...)
## S3 method for class 'potd'
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.
If pot was used then x does not contain the
raw data that alogLik needs. The model will need to be
re-fitted using pot_refit and the user will be prompted to
do this by an error message produced by alogLik.
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", "evir").
The remaining 2 components depend on the model that was fitted.
If gev was used then these components are
c("gev", "stat").
If gpd was used then these components are
c("gpd", "stat").
If pot_refit was used then these components are
c("potd", "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 evir package
got_evir <- requireNamespace("evir", quietly = TRUE)
if (got_evir) {
library(evir)
# An example from the evir::gev documentation
data(bmw)
out <- gev(bmw, "month")
adj_out <- alogLik(out)
summary(adj_out)
# An example from the evir::gpd documentation
data(danish)
out <- gpd(danish, 10)
adj_out <- alogLik(out)
summary(adj_out)
# An example from the evir::pot documentation
# We use lax::pot_refit() to return the input data
out <- pot_refit(danish, 10)
adj_out <- alogLik(out)
summary(adj_out)
}