Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
TODO*
^INSTALL*
^.*\.Rproj$
^\.Rproj\.user$
^README.Rmd
^README.md
^\.github$
^vignettes/jss.bst
99 changes: 51 additions & 48 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,51 @@
name: R-CMD-INSTALL

on:
push:
pull_request:

jobs:
release:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
R: [ '4.3' ]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.R }}
rtools-version: '43'

- uses: r-lib/actions/setup-r-dependencies@v2

- run: |
cd ..; R CMD INSTALL --build NSGEV
mkdir NSGEV/R-${{ matrix.R }}
mv NSGEV_*.* NSGEV/R-${{ matrix.R }}/.
shell: bash
name: R CMD INSTALL

- uses: actions/upload-artifact@v2
with:
path: ./R-*

- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./R-*/*.tar.gz
./R-*/*.tgz
./R-*/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: R-CMD-INSTALL

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

jobs:
release:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
R: [ '4.4' ]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.R }}
rtools-version: '44'

- uses: r-lib/actions/setup-r-dependencies@v2

- run: |
cd ..; R CMD INSTALL --build NSGEV
mkdir NSGEV/R-${{ matrix.R }}
mv NSGEV_*.* NSGEV/R-${{ matrix.R }}/.
shell: bash
name: R CMD INSTALL

- uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.os }}
path: ./R-*

- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./R-*/*.tar.gz
./R-*/*.tgz
./R-*/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53 changes: 53 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
&# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
#
# See https://github.com/r-lib/actions/tree/master/examples#readme for
# additional example workflows available for the R community.

name: r-cmd-check

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
r-cmd-check:
runs-on: ${{ matrix.config.os }}

strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'release'}

steps:
- uses: actions/checkout@v3

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get install libcurl4-openssl-dev

- name: Set up R ${{ matrix.config.r }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}

- name: Install dependencies
run: |
install.packages(pkgs = c("remotes", "rcmdcheck"), dependencies = TRUE, type = ifelse(.Platform$OS.type == "windows", "binary", getOption("pkgType")))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}

- name: Check
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--ignore-vignettes"), build_args = c("--no-build-vignettes"), error_on = "warning", check_dir = "check")
shell: Rscript {0}
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

THIS FILE IS NO LONGER UPDATED. See instead the 'NEWs.md' file.

2022-05-27 yves <[email protected]>

* A Taylor expansion is now used for the probability functions and
Expand Down
11 changes: 5 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
Package: NSGEV
Type: Package
Title: Non-Stationary GEV Time Series
Version: 0.1.8
Date: 2023-05-11
Author: Yves Deville <[email protected]>
Version: 0.2.0
Date: 2024-12-02
Authors@R:
c(person(given = "Yves",
family = "Deville",
Expand All @@ -14,11 +13,11 @@ Maintainer: Yves Deville <[email protected]>
Description: Utility functions for Non-Stationary time series with GEV margins.
License: GPL-3
LazyData: yes
Imports: methods, splines, numDeriv, nloptr, data.table, reshape2, tidyr, forecast, scales, grDevices
Imports: utils, methods, splines, numDeriv, nloptr, data.table, reshape2, tidyr, forecast, scales, grDevices
Depends: ismev, extRemes, nieve, ggplot2
Suggests: parallel, doParallel, foreach, testthat, rmarkdown, knitr, png
Suggests: parallel, doParallel, foreach, testthat, rmarkdown, knitr, png, deSolve
Encoding: UTF-8
URL: https://github.com/IRSN/NSGEV/
BugReports: https://github.com/IRSN/NSGEV/issues/
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
VignetteBuilder: knitr
13 changes: 11 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ S3method(predict,TVGEV)
S3method(print,NSGEV)
S3method(print,TVGEV)
S3method(print,bts)
S3method(print,profLik.TVGEV)
S3method(print,summary.NSGEV)
S3method(print,summary.TVGEV)
S3method(print,summary.profLik.TVGEV)
S3method(profLik,TVGEV)
S3method(psi2theta,NSGEV)
S3method(psi2theta,TVGEV)
Expand All @@ -55,10 +57,11 @@ S3method(simulate,NSGEV)
S3method(simulate,TVGEV)
S3method(summary,NSGEV)
S3method(summary,TVGEV)
S3method(summary,profLik.TVGEV)
S3method(vcov,TVGEV)
S3method(window,bts)
export(.qMax.TVGEV)
export(.qMin.TVGEV)
export(.qMaxL.TVGEV)
export(.qMaxU.TVGEV)
export(NSGEV)
export(RL)
export(TVGEV)
Expand All @@ -74,21 +77,26 @@ export(check_confint)
export(check_predict)
export(check_predictUncond)
export(d2negLogLikFun)
export(dMax.TVGEV)
export(distLines)
export(modelMatrices)
export(moment)
export(natSplineX)
export(opacity)
export(pMax.TVGEV)
export(parNames)
export(polynomX)
export(predictUncond)
export(profLik)
export(psi2theta)
export(qMax.TVGEV)
export(quantMax)
export(quantMaxFun)
export(quantMaxPLODE)
export(rNames)
export(rho2psi)
export(selectDate)
export(testNumDeriv)
export(transFormula)
import("extRemes", except = c("qqplot", "qqnorm"))
import(ggplot2)
Expand Down Expand Up @@ -146,3 +154,4 @@ importFrom(stats,vcov)
importFrom(stats,weighted.mean)
importFrom(stats,window)
importFrom(utils,getS3method)
importFrom(utils,packageVersion)
54 changes: 51 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,62 @@

**NSGEV** Package News
===========================
======================

# New in version 0.1.9 (pending)
# New in version 0.2.0 (pending)

## Enhancements

- Experimental implementation of the ODE method for the determination
of the profile likelihood confidence intervals on the quantile of
the maximum. See the help of the `quanMax.TVGEV` method, and
the function `quantMaxPLODE`.

- Edits in the vignette *Introduction to NSGEV*. Typos and
clarification for the generalised residuals, thanks to Jesper Rydén
(Uppsala University). New references related to the generalised
residuals. The section on the quantile of the maximum a.k.a. *design
life level* now includes an example with profile likelihood
intervals, at the price of an increased computation time.

## Changes

- In the `resid` method for the class `"TVGEV"` the generalised
residuals now use the standard Gumbel target distribution rather
than a standard exponential.


# New in version 0.1.9

## Enhancements

- The `quantMax` method for the class `"TVGEV"` now computes the
profile-likelihood intervals on the quantile of the maximum on an
arbitrary "design-life" period. The computation is quite long for
now hence is illustrated in a `dontrun` part of the examples for
`quanMax.TVGEV` method.

- The `TVGEV` function did not work when some (non temporal)
covariates add missing values.
covariates had missing values.

- The functions `qMax.TVGEV` and `pMax.TVGEV` now compute the gradient
and the Hessian w.r.t. the parameters, opening the road to profile
likelihood inference on the quantile of the maximum. The wew
function `dMax.TVGEV` computes the gradient w.r.t. the parameters.

- New tests dedicated to the `qMax.TVEV`, `pMax.TVEV` and `dMax.TVGEV`
functions.

- Fixes in the documentation.

- New long-form documentation *NSGEV: Computing Details*, mainly
dedicated to the the computation of the profile likelihood
intervals. This is a Rweave document `.Rnw` hence will not appear on
the `pkgdown` site. It could be removed from the vignettes if this
generates installation problems for some users.

- The bibliography file for the vignettes `NSGEV.bib` has been cleaned
and provides DOIs when these are available.

## Bug fixes

- In `quantMax.TVGEV` the check on `prob` was misleading.
Expand Down
Loading
Loading