Skip to content

Releases: epinowcast/primarycensored

primarycensored 1.0.0

28 Oct 12:22
Compare
Choose a tag to compare

This is the first major release of primarycensored and the first to be available from CRAN.

Package

  • Fix internal package misspelling of primary_lpdf.
  • Move to "stable" lifecycle status.
  • Added rhub checks to the Github Actions workflow.
  • Added dependencies: "hard" to the R-CMD-check workflow to ensure checks pass without optional dependencies.
  • Improved handling of examples that use optional dependencies.
  • Check all URLs for redirects.
  • Ensure that all functions have documented return values.

Pull requests

  • Update codemeta.json by @github-actions in #138
  • Update README by @github-actions in #140
  • Update codemeta.json by @github-actions in #141
  • Update codemeta.json by @github-actions in #151
  • Update README by @github-actions in #154
  • Update codemeta.json by @github-actions in #153
  • Update codemeta.json by @github-actions in #156
  • Update README by @github-actions in #158
  • Update README by @github-actions in #160
  • Update codemeta.json by @github-actions in #159
  • Update README by @github-actions in #163
  • Update codemeta.json by @github-actions in #162

Full Changelog: v0.6.0...v1.0.0

primarycensored 0.6.0

09 Oct 17:04
Compare
Choose a tag to compare

This release renames the package to primarycensored from primarycensoredist and also renames many of the functions to remove the dist in their name. This was done to make the package name and the functions more consistent and to remove the need to use the dist suffix. It also aligns it with the new PrimaryCensored.jl package in our Julia ecosystem.

Aside from name changes, this release also adds an analytical solution for the weibull distribution with uniform primary censoring, removes the need to assign functions to the global environment for fitdistdoublecens() by using withr, and adds a check_truncation() function to check if the truncation time is larger than the maximum observed delay. This is used in fitdistdoublecens() and pcd_as_stan_data() to ensure that the truncation time is appropriate to maximise computational efficiency.

Package

  • Removed the need to assign functions to the global environment for fitdistdoublecens() by using withr.
  • Added a check_truncation() function to check if the truncation time is larger than the maximum observed delay. This is used in fitdistdoublecens() and pcd_as_stan_data() to ensure that the truncation time is appropriate to maximise computational efficiency.
  • pcd_as_cmdstan_data() has been renamed to pcd_as_stan_data() to better reflect that it is used for Stan models in general rather than just the CmdStan models.
  • The stan code has been refactored into a folder of functions within the current stan folder and the stan model has been moved into the stan folder. All paths to the stan code have been updated to reflect this.
  • Added R and stan implementations of the primary censored cdf for the weibull distribution with uniform primary censoring.
  • The package has been renamed to primarycensored as have all functions that use "dist" in their name.

Documentation

  • Simplified the "Analytic solutions" vignette by removing verbose derivation details.
  • Added links between vignettes to make it easier to navigate the documentation.
  • Added explicit usage of pdist, dprimary, rdist, and rprimary arguments in the getting started vignette to make it easier to link to mathematical details.
  • Fixed error in "Analytic solutions" vignette where the Weibull density was not being treated as zero for negative delays.
  • Split "Why it works" vignette into two separate vignettes, "Why it works" and "Analytic solutions for censored delay distributions"

Pull requests

  • Update codemeta.json by @github-actions in #103
  • Issue 72: Split why it works vignette into intro and analytic solutions vignette by @SamuelBrand1 in #106
  • Bump JamesIves/github-pages-deploy-action from 4.6.4 to 4.6.8 by @dependabot in #110
  • Update README by @github-actions in #111
  • use local environment for fitdist call by @sbfnk in #113
  • Update codemeta.json by @github-actions in #114
  • Update README by @github-actions in #115
  • Issue #84: Prune not helpful to arg flow maths by @seabbs in #116
  • Issue #82: Link between vignettes by @seabbs in #118
  • Issue #69: Add check_truncation by @seabbs in #120
  • Update README by @github-actions in #121
  • Issue 109: Add explicit dist and primary arg usage to getting started by @seabbs in #122
  • Issue 70: Restructure stan code by @seabbs in #123
  • Issue 125: Update analytic solutions to deal with possible neg t values by @SamuelBrand1 in #126
  • Issue 94: Add R and Stan for analytical Weibull by @seabbs in #109
  • Update codemeta.json by @github-actions in #128
  • Issue #108: Rename from primarycensoreddist to primarycensored by @seabbs in #130
  • Update README by @github-actions in #132
  • Update codemeta.json by @github-actions in #131

New Contributors

Full Changelog: v0.5.0...v0.6.0

primarycensoreddist 0.5.0

21 Sep 22:52
7ada1c9
Compare
Choose a tag to compare

This release adds a new {touchstone} based benchmark suite to the package. It also adds a new "How it works" vignette which aims to give the reader more details into how the primary censored distributions work.

As part of the "How it works" we (@SamuelBrand1) found analytical solutions for the gamma, lognormal, and weibull distributions with uniform primary censoring. These are now implemented for the lognormal and gamma distributions in the R and stan code providing significant speedups to the fitting process (~10-20 times faster). The Weibull will be added in the next release.

Package

  • Add {touchstone} based benchmarks for benchmarking R utility functions, and fitting the stan and fitdistplus models.
  • Added a "How it works" vignette.
  • Added R infrastructure for analytical solutions via the primary_censored_dist S3 class.
  • Added Weibull analytical solution to "How it works" vignette.
  • Added analytical solutions for the gamma and lognormal distributions with uniform primary censoring to both the R and stan code.
  • Added numerical protection to ensure that CDFs for delays greater than the maximum truncation are exactly 1.

Pull requests

  • Update codemeta.json by @github-actions in #74
  • Update codemeta.json by @github-actions in #78
  • Issue 36: Add benchmarking of R, Stan, and fitdistdoublecens by @seabbs in #79
  • Issue 37 draft: Why it works vignette with analytic solutions by @SamuelBrand1 in #68
  • Update codemeta.json by @github-actions in #81
  • Issue 86: Fixes for "Why it works" vignette by @SamuelBrand1 in #88
  • Update README by @github-actions in #89
  • Issue 85: Add infrastructure for analytical solutions in R by @seabbs in #87
  • Update README by @github-actions in #92
  • Issue 85: Implement analytical solutions in R by @seabbs in #90
  • Issue 76: Add weibull distribution to analytic solutions in vignette by @SamuelBrand1 in #93
  • Issue 85: Analytical solutions in stan by @seabbs in #95
  • Update README by @github-actions in #99
  • Update codemeta.json by @github-actions in #98

New Contributors

Full Changelog: v0.4.0...v0.5.0

primarycensoreddist 0.4.0

17 Sep 09:43
Compare
Choose a tag to compare

In this release, we have added a new package stan model for fitting distributions using the cmdstanr package. We have also added a new function fitdistdoublecens() to allow for fitting of double censored and truncated data using the fitdistrplus package. As well as these functionality improvements this release focuses on improving the stability of the CmdStan model and improving the speed of the primary_censored_ode function.

Package

  • Added a new function fitdistdoublecens() to allow for fitting of double censored and truncated data using the fitdistrplus package.
  • Added low level tests for the Stan primary_censored_ode function.
  • Rephrased the stan code to use a ODE solver rather than a numerical integration method. This allows for much faster and more stable computation of the likelihood
  • Added a CmdStan model for fitting distributions using the cmdstanr package.
  • Added helpers functions for working with the new CmdStan model and added an example to the vignette.
  • Added parameter recovery tests for the new CmdStan model which tests the primary_censored_dist_lpmf function when used with NUTS based fitting.

Pull Requests

  • Update codemeta.json by @github-actions in #54
  • Update README by @github-actions in #57
  • Update codemeta.json by @github-actions in #56
  • Bump peter-evans/create-pull-request from 6 to 7 by @dependabot in #59
  • Bump JamesIves/github-pages-deploy-action from 4.6.3 to 4.6.4 by @dependabot in #60
  • Issue 55: Add fitdistdoublecens wrapper by @seabbs in #61
  • Issue 34: rephrase integral as an ODE by @seabbs in #64
  • Issue 35 and 36: Package CmdStan model by @seabbs in #67

Full Changelog: v0.3.0...v0.4.0

primarycensoreddist 0.3.0

06 Sep 22:51
a63b0b6
Compare
Choose a tag to compare

This release fixes and improves truncation handling across the code base. It also adds a new vignette showcasing how to use the primarycensoreddist and fitdistrplus packages together to fit distributions.

Package

  • Updated the approach to truncation to be outside the primary censored distribution integral.
  • Improved tests that compare random sampling and probability mass/density functions between R and Stan.
  • Improved cross-testing between R and Stan implementations of the primary censored distributions.
  • Worked on improving the stability of the primary_censored_dist_lpmf when used for NUTS based fitting (i.e. in Stan).

Documentation

  • @athowes improved the getting started vignette by catching a few grammar errors and simplifying language.
  • Added a new vignette showcasing how to use the primarycensoreddist and fitdistrplus packages together to fit distributions.

Pull requests

  • Update codemeta.json by @github-actions in #42
  • Better truncation handling by @seabbs in #44
  • Small suggestions on getting started vignette by @athowes in #43
  • Update codemeta.json by @github-actions in #46
  • Update codemeta.json by @github-actions in #47
  • Issue 13: fitdistrplus vignette by @seabbs in #49

New Contributors

Full Changelog: v0.2.0...v0.3.0

primarycensoreddist 0.2.0

04 Sep 21:38
e1a495d
Compare
Choose a tag to compare

This release puts in place initial documentation and vignettes. It also includes a new primary censored distribution interface to allow for non-secondary event censored distributions. Development of this release as identified some numerical issues in the
gradient evaluations for the primary censored distributions which may lead to breaking
interface changes in 0.3.0 for the Stan code.

Package

  • Added support for swindow = 0 to rprimarycensoreddist to allow for non-secondary event censored distributions.
  • Adapted rprimarycensoreddist so that truncation is based on the primary censored distribution before secondary events are censored. This better matches the generative process.
  • Added a new Stan interface tool to enable finding which files functions are implemented in the Stan code.

Documentation

  • Added a getting started vignette.
  • Added a vignette showcasing how to use the package Stan code with cmdstanr.
  • Added a vignette showcasing how to fit distributions using the cmdstanr package.

Pull requests

  • Update README by @github-actions in #18
  • Update codemeta.json by @github-actions in #20
  • Update CITATION.cff by @github-actions in #19
  • Add swindow = 0 support for sampling from the primary censored distributions. by @seabbs in #21
  • Issue 15: Getting started vignette by @seabbs in #22
  • Update codemeta.json by @github-actions in #24
  • Issue 23: Switch sampling order to truncate and then censor by @seabbs in #26
  • Issue 14: Add using primarycensoreddist with stan vignette by @seabbs in #27
  • Update README by @github-actions in #28
  • Update README by @github-actions in #30
  • Issue 14: Fitting delay estimates using primarycensoreddist by @seabbs in #33
  • Update codemeta.json by @github-actions in #39
  • Update codemeta.json by @github-actions in #40

New Contributors

Full Changelog: v0.1.0...v0.2.0

primarycensoreddist 0.1.0

02 Sep 23:08
Compare
Choose a tag to compare

This is the initial primarycensoreddist release and includes R and stan tools for dealing with potentially truncated primary event censored delay distributions. We expect all current features to work but the UI may change as the package matures over the next few versions.

Package

  • Added package skeleton.
  • Added checking input functions.
  • Added stan functions for primary censored and truncated distributions.
  • Added R functions for primary censored and truncated distributions.
  • Add R function to facilitate working with the Stan code.
  • Added tests for primary censored and truncated distributions.
  • Added tests to compare R and Stan implementations.
  • Added tests for the R functions that facilitate working with the Stan code.
  • Resolved R CMD check errors, warnings and notes.
  • Added a hexsticker.
  • Added vignette skeletons in preparation for 0.2.0 release.