Releases: paulnorthrop/lax
lax: Loglikelihood Adjustment for Extreme Value Models v1.2.4
lax 1.2.4
Bug fixes
- Updates to methods for
mev::fit.egp()to comply with versions 2.0 and add new models. - Add Details, Value and Examples sections in
logLik.logLikVec.RdandlogLikVec.Rdto avoid CRAN HTML validation NOTE on r-devel Debian.
lax: Loglikelihood Adjustment for Extreme Value Models v1.2.3
lax 1.2.3
Bug fixes
- Calls to
texmex::evm(), which resulted in CRAN package check ERRORs on some platforms, have been avoided.
lax: Loglikelihood Adjustment for Extreme Value Models v1.2.2
lax 1.2.2
Bug fixes
- Fixed issues with the incorrect use of \itemize in some Rd files.
lax: Loglikelihood Adjustment for Extreme Value Models
lax 1.2.1
Bug fixes and minor improvements
-
The original model object
xis added as an attribute"original_fit"to the object returned fromalogLik(x). -
In the documentation of
return_level()the role ofnpyhas been explained and a more accurate calculation is used for the estimation of return levels in the case wherenpyis not equal to 1. -
If the argument
clusterwas supplied analogLik()method then this is now returned as the attributeclusterin the returned object, rather than the default returned bychandwich::adjust_loglik(). -
Create the help file for the package correctly, with alias lax-package.
-
README.md: Used app.codecov.io as base for codecov link.
-
Activated 3rd edition of the
testthatpackage
lax: Loglikelihood Adjustment for Extreme Value Models
lax 1.2.0
New features
- The eva package is now supported: functions
gpdFitandgevrFit.
Bug fixes and minor improvements
-
The links at the end of the Details section of the main lax package help page have been corrected.
-
Depreciated function
testthat::contextis no longer used. -
Some obsolete code has been deleted from the lax help file for mev.
lax: Loglikelihood Adjustment for Extreme Value Models
lax 1.1.0
New features
-
The mev package is now supported: functions
fit.gev,fit.gpd,fit.egp,fit.ppandfit.rlarg. -
The function
rlarg.fitin the ismev package is now supported.
Bug fixes and minor improvements
-
Unecessary generic information concerning the availability of S3 methods has been removed from the Details sections of the package-specific loglikelihood adjustment documentation.
-
More tests of internal function box_cox_deriv().
lax: Loglikelihood Adjustment for Extreme Value Models
What does lax do?
The CRAN Task View on Extreme Value Analysis provides information about R packages that perform various extreme value analyses. The lax package supplements the univariate extreme value modelling, including regression modelling, provided by 7 of these packages, namely evd, evir, extRemes, fExtremes, ismev, POT and texmex. lax works in an object-oriented way, operating on R objects returned from functions in other packages that summarise the fit of an extreme value model. It uses the chandwich package to provide robust sandwich estimation of parameter covariance matrix and loglikelihood adjustment for models fitted by maximum likelihood estimation. This is performed by an alogLik S3 method, illustrated by the following example.
An example
This example is based on the analysis presented in Section 5.2 of Chandler and Bate (2007). The data, which are available in the data frame ow, are a bivariate time series of annual maximum temperatures, recorded in degrees Fahrenheit, at Oxford and Worthing in England, for the period 1901 to 1980. If interest is only in the marginal distributions of high temperatures in Oxford and Worthing, then we might fit a GEV regression model in which some or all of the parameters may vary between Oxford and Worthing. However, we should adjust for the cluster dependence between temperatures recorded during the same year.
The following code fits such a model using the evm function in the texmex package and the uses alogLik to perform adjusted inferences.
library(lax)
library(texmex, quietly = TRUE)
# Fit a GEV model with separate location, scale and shape for Oxford and Worthing
# Note: phi = log(scale)
evm_fit <- evm(temp, ow, gev, mu = ~ loc, phi = ~ loc, xi = ~loc)
# Adjust the loglikelihood and standard errors
adj_evm_fit <- alogLik(evm_fit, cluster = ow$year, cadjust = FALSE)
# MLEs, SEs and adjusted SEs
summary(adj_evm_fit)
#> MLE SE adj. SE
#> mu: (Intercept) 81.17000 0.32820 0.40360
#> mu: loc 2.66800 0.32820 0.21280
#> phi: (Intercept) 1.30600 0.06091 0.06490
#> phi: loc 0.14330 0.06091 0.05074
#> xi: (Intercept) -0.19900 0.04937 0.03943
#> xi: loc -0.08821 0.04937 0.03624An object returned from aloglik is a function to evaluate the adjusted loglikelihood, with anova, coef, confint, logLik, nobs, plot, print, summary and vcov methods.
Installation
To get the current released version from CRAN:
install.packages("lax")Vignette
See vignette("lax-vignette", package = "lax") for an overview of the package.