ismev: Loglikelihood adjustment of ismev fits

Description Usage Arguments Details Value References See Also Examples

Description

Loglikelihood adjustment for fitting Generalised Extreme Value (GEV) model and Threshold Modelling using generalised Pareto distribution (GPD). The adjustment is based on package ismev.

Usage

1
2
3
4
5
## S3 method for class 'gev.fit'
alogLik(x, cluster = NULL, use_vcov = TRUE, ...)

## S3 method for class 'gpd.fit'
alogLik(x, cluster = NULL, use_vcov = TRUE, ...)

Arguments

x

A fitted model object.

cluster

see details in adjust_loglik.

use_vcov

A logical scalar. If use_vcov = TRUE and the method for x exists, we use it to estimate the Hessian of the independence loglikelihood and pass it as H to adjust_loglik. Otherwise, set H as NULL.

...

Further arguments to be passed to the functions in the sandwich package meat, if cluster = NULL, or meatCL, otherwise.

Details

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.

Value

An object of class c("oolax", "chandwich") with the same structure as an object returned from adjust_loglik.

References

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).

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# We need the ismev package
got_ismev <- requireNamespace("ismev", quietly = TRUE)

if (got_ismev) {
  library(ismev)

  # An example from Chandler and Bate (2007)
  y <- c(chandwich::owtemps[, "Oxford"], chandwich::owtemps[, "Worthing"])
  x <- as.matrix(rep(c(1, -1), each = length(y) / 2))
  owfit <- oogev.fit(y, x, mul = 1, sigl = 1, shl = 1, method = "BFGS" )
  year <- rep(1:(length(y) / 2), 2)
  adj_owfit <- alogLik(owfit, cluster = year, cadjust = FALSE)
  summary(adj_owfit)

 # An example from the gpd.fit() documentation
 data(rain)
 fit <- oogpd.fit(rain, 10)
 adj_fit <- alogLik(fit)
 summary(adj_fit)
}

RuoqingYin/oolax documentation built on May 28, 2019, 12:20 p.m.