Regularized Point Processes and Stochastic Marginalization for Extremes
Overview
Implements a non-stationary extreme value analysis framework by coupling a covariate-driven non-homogeneous Poisson process (NHPP) with (adaptive) elastic-net regularization and analytical gradients. Provides methods for estimating conditional return levels and unconditional (marginalized) return levels via parametric stochastic integration over stable vector autoregressive VAR(p) covariate trajectories, or non-parametric annual-block resampling. Supports block-specific penalty controls, BIC selection along a regularization path, Karush-Kuhn-Tucker convergence checks, time-rescaling residual diagnostics, conditional parametric bootstrap inference, and walk-forward assessment.
Breaking changes
fit_nhpp(lambda_scaling = )now defaults to"common"(one scalar penalty for all parameter blocks), the convention used in the dissertation and articles. Uselambda_scaling = "gradient"for the previous score-calibrated block penalties.- With
lambda = "bic", the returned model is now the regularization-path solution at the selected penalty, so the reported fit is exactly the one scored by the BIC. - Convergence is now certified by the Karush-Kuhn-Tucker conditions of the penalized problem (
grad_tol, scaled by the number of exceedances) rather than by the optimizer's return code. Fits that previously reported convergence may now warn, and vice versa.
Show all changes in 0.4.0Hide the rest of the changes in 0.4.0
summary()returns an object of classsummary.nhpp_fit(printed as before) instead of printing directly.- The
varsdependency was removed. VAR(p) generators are fitted by least squares with Schwarz order selection on a common sample, which reproducesvars::VARselect()andvars::VAR(); a single covariate is a VAR(p) with K = 1 rather than a separate AR model. - Random-number streams changed: bootstrap replicates use independent L'Ecuyer-CMRG streams and trajectories are simulated jointly, so results for a given seed differ from 0.3.0.
Estimation
- Adaptive LASSO:
penalty_weights = "adaptive"computes weights1 / |theta|^adaptive_gammafrom an unpenalized fit (ridge fallback); numeric coordinate weights are also accepted. - New
fit_nhpp()argumentslambda_grid,init, andgrad_tol. The optimizer falls back from BFGS to L-BFGS-B and a restarted BFGS when the KKT check fails. - Fitted objects store the penalty weights, the KKT violation, the evaluated regularization path (
fit$path), and the observed series. - The likelihood, gradient, and penalty are evaluated once per parameter vector and shared between objective and gradient calls.
Methods and diagnostics
- New methods
logLik(),nobs(),predict(),residuals(), andcoef()fornhpp_fit;AIC()andBIC()work throughlogLik(). residuals()returns time-rescaling interarrival residuals and magnitude residuals, both standard exponential under the model.plot.nhpp_fit()gainstype = "path"(BIC curve and coefficient paths) andtype = "qq"(exponential Q-Q plots with exact pointwise bands).n_exceedances()uses the stored series whenyis omitted.
Marginalization and covariates
- New
seasonal_harmonics(); harmonics of any order (cos<k>,sin<k>,sen<k>) are recognized and rebuilt automatically. marginalize()returns annhpp_rlobject with Monte Carlo standard errors of the return-level roots (se_mc), acceptsfixedcovariate values (e.g.list(trend = 1)), fills inactive design columns silently, and has aplot()method.fit_var_generator()gainsn_harmonics, excludes deterministic variables from the VAR, and supports derived covariates (lags, moving averages) throughderiveandderive_lead.simulate_covariates()simulates all trajectories at once and gainsseed.
Bootstrap and walk-forward assessment
- Bootstrap refits start from the original estimate and keep the original penalty weights, gradient tolerance, and scaling. Results do not depend on the new
coresargument; replicate matrices are returned as the attribute"replicates". backtest()gainstrend_col(trend renormalized within each training window),fixed,reselect_lambda, andcores. Adaptive weights are recomputed inside each training window, and covariates inactive in a window refit are filled without warnings.
Documentation
- New vignette, examples for every exported function, and an updated citation file.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK7 OK2026-07-24
Documentation
- Help pages
- 26
- Examples that run
- 100%26 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 4%
Downloads
Repository
Releases over time
Commits over time
3 development-tooling and community-health practices detected across 2 families in the upstream repository
Checks run against github.com/rodrigosqrt3/margevt on 2026-10-22.
The R CMD check workflow runs on Linux, macOS and Windows
Dependencies
Installing margEVT adds no packages beyond those that come with R.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 0.4.0Latest2026-10-13 · current release · diff ↗ ··
added 1 export
seasonal_harmonicslisted once in CRAN's queue
Seen in one reading of CRAN's incoming queue, at 2026-10-13 21:40 UTC, so it stayed less than the time between readings. - 0.3.02026-09-23 · diff ↗
- 0.2.02026-07-30 · diff ↗
- 0.1.12026-07-30 · diff ↗
- 0.1.02026-07-23
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-07-23
- Total releases
- 5 / 1 yrs
- License
- GPL (>= 3) OSI
- Download size
- 123 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("margEVT")The package provides a citation file, so citation() returns the authors' own entry.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.