Description Usage Arguments Details Value References See Also Examples
Loglikelihood adjustment for fitting Generalised Extreme Value (gev) model and
Threshold Modelling using generalised Pareto distribution (gpd). The adjustment is
based on package evd.
| 1 2 | 
| x | A fitted model object. | 
| cluster | see details in  | 
| use_vcov | A logical scalar. If  | 
| ... | Further arguments to be passed to the functions in the
sandwich package  | 
The fitted object must have S3 methods:
logLikVec, coef, and nobs.  It may have method vcov and
estfun. If a vcov method is not available then the variance-covariance
matrix of the model parameters is estimated inside
adjust_loglik. If an estfun method is not available
then the score matrix is estimated using jacobian. More in
See Also.
An object of class c("oolax", "chandwich") with the same structure as an
object returned from adjust_loglik.
Zeileis A (2006). <e2><80><9c>Object-Oriented Computation of Sandwich Estimators.<e2><80><9d> _Journal of Statistical Software_, *16*(9), 1-16. doi: 10.18637/jss.v016.i09 (URL:http://doi.org/10.18637/jss.v016.i09).
adjust_loglik Loglikelihood adjustment using the sandwich
estimator.
logLikVec.gev Loglikelihood vector for GEV Distribution fitted
by fgev
logLikVec.pot Loglikelihood vector for GPD Distribution fitted
by fpot
logLikVec.ismev_gev Loglikelihood vector for GEV Distribution
fitted by gev.fit
logLikVec.ismev_gpd Loglikelihood vector for GPD Distribution
fitted by gpd.fit
| 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 | # We need the evd package
got_evd <- requireNamespace("evd", quietly = TRUE)
if (got_evd) {
  library(evd)
  # An example from the evd::fgev documentation
  uvdata <- evd::rgev(100, loc = 0.13, scale = 1.1, shape = 0.2)
  M1 <- evd::fgev(uvdata, nsloc = (-49:50)/100)
  adj_fgev <- alogLik(M1)
  summary(adj_fgev)
  # An example from Chandler and Bate (2007)
  y <- c(chandwich::owtemps[, "Oxford"], chandwich::owtemps[, "Worthing"])
  x <- rep(c(-1, 1), each = length(y) / 2)
  owfit <- evd::fgev(y, nsloc = x)
  year <- rep(1:(length(y) / 2), 2)
  adj_owfit <- alogLik(owfit, cluster = year)
  summary(adj_owfit)
  # An example from the evd::fpot documentation
  uvdata <- evd::rgpd(100, loc = 0, scale = 1.1, shape = 0.2)
  M1 <- evd::fpot(uvdata, 1)
  adj_fpot <- alogLik(M1)
  summary(adj_fpot)
  # Fit using the pp model, rather than the gpd
  M1 <- evd::fpot(uvdata, 1, model = "pp", npp = 365)
  adj_fpot <- alogLik(M1)
  summary(adj_fpot)
}
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.