Skip to content

Commit

Permalink
Release 0.6.3.1.0 (#264)
Browse files Browse the repository at this point in the history
* NA handling in pseudo_obs() (#260)

* NA handling in pseudo_obs()

* fix gh actions

* Rcpp update on macOS

---------

Co-authored-by: tnagler <[email protected]>

* add emp_cdf() (#262)

* add emp_cdf()

* update NEWS

* export function

* fix import

---------

Co-authored-by: tnagler <[email protected]>

* prepare release (#263)

* add emp_cdf()

* update NEWS

* export function

* fix import

* remove cpp11 reqs

* update to actions/cache@v3

* actions/checkout@v3

* pull latests sources

* bump version + update docs

---------

Co-authored-by: tnagler <[email protected]>

---------

Co-authored-by: tnagler <[email protected]>
  • Loading branch information
tnagler and tnagler authored Feb 20, 2023
1 parent 8dd8846 commit e4869f0
Show file tree
Hide file tree
Showing 150 changed files with 718 additions and 502 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
Expand All @@ -48,7 +48,7 @@ jobs:

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
Expand All @@ -68,6 +68,11 @@ jobs:
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Update Rcpp
if: runner.os == 'macOS'
run: install.packages("Rcpp")
shell: Rscript {0}

- name: Session info
run: |
options(width = 100)
Expand Down
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: rvinecopulib
Type: Package
Title: High Performance Algorithms for Vine Copula Modeling
Version: 0.6.2.1.3
Version: 0.6.3.1.0
Authors@R: c(
person("Thomas", "Nagler",, "[email protected]", role = c("aut", "cre")),
person("Thibault", "Vatter",, "[email protected]", role = c("aut"))
Expand Down Expand Up @@ -44,5 +44,4 @@ LinkingTo:
kde1d
BugReports: https://github.com/vinecopulib/rvinecopulib/issues
Roxygen: list(markdown = TRUE)
SystemRequirements: C++11
RoxygenNote: 7.2.0
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export(dbicop)
export(dvine)
export(dvine_structure)
export(dvinecop)
export(emp_cdf)
export(get_all_families)
export(get_all_ktaus)
export(get_all_pair_copulas)
Expand Down Expand Up @@ -138,6 +139,7 @@ importFrom(stats,dnorm)
importFrom(stats,dt)
importFrom(stats,dunif)
importFrom(stats,dweibull)
importFrom(stats,ecdf)
importFrom(stats,logLik)
importFrom(stats,model.matrix)
importFrom(stats,pbeta)
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# rvinecopulib 0.6.3.1.0

- fix `NA` handling in `to_pseudo_obs()` (#260)

- add `emp_cdf()` for the tail corrected empirical cdf (#261)

# rvinecopulib 0.6.2.1.3 (December 3, 2022)

- fix marginal PIT for discrete variables (see issue #257, thanks @rplzzz)
Expand Down
31 changes: 31 additions & 0 deletions R/tools.R
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,37 @@ pseudo_obs <- function(x, ties_method = "average", lower_tail = TRUE) {
x
}

#' Corrected Empirical CDF
#'
#' The empirical CDF with tail correction, ensuring that its output is never
#' 0 or 1.
#'
#' @details The corrected empirical CDF is defined as
#' \deqn{
#' F_n(x) = \frac{1}{n + 1} \min\biggl\{1, \sum_{i = 1}^n 1(X_i \le x)\biggr\}
#' }
#'
#' @param x numeric vector of observations
#'
#' @return A function with signature `function(x)` that returns \eqn{F_n(x)}.
#'
#' @importFrom stats ecdf
#' @export
#' @examples
#' # fit ECDF on simulated data
#' x <- rnorm(100)
#' cdf <- emp_cdf(x)
#'
#' # output is bounded away from 0 and 1
#' cdf(-50)
#' cdf(50)
emp_cdf <- function(x) {
assert_that(is.numeric(x))
n <- length(x)
Fn <- ecdf(x)
function(xx) pmax(n * Fn(xx), 1) / (n + 1)
}

#' Truncates output of model data frames.
#'
#' @param x a `data.frame` whose print output should be truncated.
Expand Down
4 changes: 2 additions & 2 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 5 additions & 13 deletions docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pandoc: 2.19.2
pkgdown: 2.0.6
pkgdown: 2.0.7
pkgdown_sha: ~
articles: {}
last_built: 2022-12-03T13:09Z
last_built: 2023-02-20T13:56Z

Binary file modified docs/reference/Rplot001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/Rplot002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/Rplot003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/Rplot004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/Rplot005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/Rplot006.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/reference/as_rvine_structure.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified docs/reference/bicop-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/bicop-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions docs/reference/bicop.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified docs/reference/bicop_dist-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/reference/bicop_dist.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified docs/reference/bicop_methods-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e4869f0

Please sign in to comment.