Recent Releases of primarycensored
primarycensored - primarycensored 1.2.0
This minor release adds quantile functions for primary censored distributions and enhances the fitdistdoublecens() function to support varying primary censoring windows and truncation times. The release also improves documentation, particularly the Stan reference, making it easier for users to navigate and work with the Stan code.
Package
- Added new functions to compute quantiles of the primary censored distribution:
pcens_quantile(): Core implementation using numerical optimisation to find quantiles by inverting the CDF. The implementation allows for analytical solutions to be added in future versions using the same interface aspcens_cdf().qpcens()andqprimarycensored(): Convenient wrapper functions that provide alternative interfaces topcens_quantile().
- Added support to
fitdistdoublecens()to allow for varying primary censoring windows and truncation times. As part of this refactor the interface has also been improved to allow for more flexible data input.
Documentation
- Removed authorship from vignettes.
- Updated the
fitdistrplusvignette to use more complex data where the relative observation time is not constant. Also removed the note that thefitdistdoublecens()function is limited to a single primary censoring windows and truncation time as this is no longer the case. - The Stan Reference has been enhanced to make it easier to navigate the Stan code.
Pull requests
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensored/pull/202
- Update README by @github-actions in https://github.com/epinowcast/primarycensored/pull/204
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensored/pull/206
- Issue #50: Add quantile function by @seabbs in https://github.com/epinowcast/primarycensored/pull/209
- Update README by @github-actions in https://github.com/epinowcast/primarycensored/pull/211
- Issue #71: Adds support for varying right truncation and primary windows to fitdistdoublecens by @seabbs in https://github.com/epinowcast/primarycensored/pull/212
- Issue #29 - Enhance stan documentation by @jamesmbaazam in https://github.com/epinowcast/primarycensored/pull/215
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensored/pull/216
- Hotfix: Put stan reference update in the dev release news section. by @seabbs in https://github.com/epinowcast/primarycensored/pull/217
- Issue #172: Drop the authorship from vignettes by @barbora-sobolova in https://github.com/epinowcast/primarycensored/pull/220
- Update README by @github-actions in https://github.com/epinowcast/primarycensored/pull/221
- Update README by @github-actions in https://github.com/epinowcast/primarycensored/pull/222
- Bump JamesIves/github-pages-deploy-action from 4.7.2 to 4.7.3 by @dependabot in https://github.com/epinowcast/primarycensored/pull/210
New Contributors
- @barbora-sobolova made their first contribution in https://github.com/epinowcast/primarycensored/pull/220
Full Changelog: https://github.com/epinowcast/primarycensored/compare/v1.1.0...v1.2.0
- R
Published by seabbs 9 months ago
primarycensored - primarycensored 1.1.0
This minor release improves the documentation and the internal system used to automatically discover analytical solutions. It also adds lookups for supported supported distributions and tooling for working with these lookups. This makes it easier for package developers using primarycensored and also makes it easier to work with the Stan likelihood functions by improving the discoverability of the distribution functions. Minor bugs were also fixed.
Package
- Updated the CI so that stan code is also tested on Windows and Mac. This is to ensure that the stan code is compatible with these platforms and in response to a CI bug in
epidist. - Revised approach to automatic discovery of distribution functions. This soft deprecates the
pdist_nameanddprimary_namearguments throughout. Users wishing to pass distribution names (i.e. to potentially leverage analytical solutions) are advised to use the newly introducedadd_name_attribute()function. Adds transient dependency onlifecycleandrlangpackages. See #188 by @pearsonca. - Added
pcd_stan_dist_id()to allow for discovery of distribution IDs for Stan models. - Added
pcd_dist_name()to allow for discovery of distribution names for R functions as needed foradd_name_attribute(). - Added documentation to suggest the use of
methods(pcens_cdf)to find analytical solutions. - Added new data sets
pcd_distributionsandpcd_primary_distributionsto document the distributions supported byprimarycensored.
Documentation
- Added a CRAN downloads badge to the README.
- Corrected how to specify an empty array in the docs of
primarycensored_lcdf(). - All documentation was reviewed and updated to enhance readability and clarity.
Bug fixes
- Added a missing
@familytag to thepcensfunctions. This omission resulted in the Weibull analytical solution not being visible in the package documentation. - Added precalculation of vector sizes to the
primarycensored_cdf()stan function, avoiding errors on some platforms due to narrowing conversions in aggregate initialisation. - Changed
Dto be of type real inpcens_model.stanin order to support infiniterelative_obs_time. - Switched to using
num_elements()oversize()in all stan code to resolve compilation issues on some platforms as reported by @sbfnk.
Pull requests
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensored/pull/165
- Update README by @github-actions in https://github.com/epinowcast/primarycensored/pull/167
- Remove duplicate line in vignette by @athowes in https://github.com/epinowcast/primarycensored/pull/173
- Bump JamesIves/github-pages-deploy-action from 4.6.8 to 4.6.9 by @dependabot in https://github.com/epinowcast/primarycensored/pull/168
- Bump JamesIves/github-pages-deploy-action from 4.6.9 to 4.7.1 by @dependabot in https://github.com/epinowcast/primarycensored/pull/174
- 177: use
num_elementsinstead ofsizeby @sbfnk in https://github.com/epinowcast/primarycensored/pull/178 - 179: make D real by @sbfnk in https://github.com/epinowcast/primarycensored/pull/180
- 181: pre-assign sizes to variables by @sbfnk in https://github.com/epinowcast/primarycensored/pull/182
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensored/pull/183
- Bump JamesIves/github-pages-deploy-action from 4.7.1 to 4.7.2 by @dependabot in https://github.com/epinowcast/primarycensored/pull/176
- Update README by @github-actions in https://github.com/epinowcast/primarycensored/pull/185
- Use correct specification of empty array by @jamesmbaazam in https://github.com/epinowcast/primarycensored/pull/186
- Turn on stan testing for mac and windows on CI by @seabbs in https://github.com/epinowcast/primarycensored/pull/189
- Bump mattnotmitt/doxygen-action from 1.9.8 to 1.12.0 by @dependabot in https://github.com/epinowcast/primarycensored/pull/190
- Pdist naming alt by @pearsonca in https://github.com/epinowcast/primarycensored/pull/188
- Update README by @github-actions in https://github.com/epinowcast/primarycensored/pull/191
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensored/pull/192
- Issue #193: Swap to num_elements from size by @seabbs in https://github.com/epinowcast/primarycensored/pull/194
- Issue #175: Add distribution look up tables and associated tooling by @seabbs in https://github.com/epinowcast/primarycensored/pull/195
- Update README by @github-actions in https://github.com/epinowcast/primarycensored/pull/197
- Documentation review changes by @seabbs in https://github.com/epinowcast/primarycensored/pull/198
- Update README by @github-actions in https://github.com/epinowcast/primarycensored/pull/200
New Contributors
- @jamesmbaazam made their first contribution in https://github.com/epinowcast/primarycensored/pull/186
- @pearsonca made their first contribution in https://github.com/epinowcast/primarycensored/pull/188
Full Changelog: https://github.com/epinowcast/primarycensored/compare/v1.0.0...v1.1.0
- R
Published by seabbs about 1 year ago
primarycensored - primarycensored 1.0.0
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
rhubchecks to theGithub Actionsworkflow. - Added
dependencies: "hard"to theR-CMD-checkworkflow 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 https://github.com/epinowcast/primarycensored/pull/138
- Update README by @github-actions in https://github.com/epinowcast/primarycensored/pull/140
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensored/pull/141
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensored/pull/151
- Update README by @github-actions in https://github.com/epinowcast/primarycensored/pull/154
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensored/pull/153
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensored/pull/156
- Update README by @github-actions in https://github.com/epinowcast/primarycensored/pull/158
- Update README by @github-actions in https://github.com/epinowcast/primarycensored/pull/160
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensored/pull/159
- Update README by @github-actions in https://github.com/epinowcast/primarycensored/pull/163
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensored/pull/162
Full Changelog: https://github.com/epinowcast/primarycensored/compare/v0.6.0...v1.0.0
- R
Published by seabbs over 1 year ago
primarycensored - primarycensored 0.6.0
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 usingwithr. - Added a
check_truncation()function to check if the truncation time is larger than the maximum observed delay. This is used infitdistdoublecens()andpcd_as_stan_data()to ensure that the truncation time is appropriate to maximise computational efficiency. pcd_as_cmdstan_data()has been renamed topcd_as_stan_data()to better reflect that it is used forStanmodels in general rather than just theCmdStanmodels.- The stan code has been refactored into a folder of functions within the current
stanfolder and thestanmodel has been moved into thestanfolder. 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
primarycensoredas 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, andrprimaryarguments 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 https://github.com/epinowcast/primarycensored/pull/103
- Issue 72: Split why it works vignette into intro and analytic solutions vignette by @SamuelBrand1 in https://github.com/epinowcast/primarycensored/pull/106
- Bump JamesIves/github-pages-deploy-action from 4.6.4 to 4.6.8 by @dependabot in https://github.com/epinowcast/primarycensored/pull/110
- Update README by @github-actions in https://github.com/epinowcast/primarycensored/pull/111
- use local environment for
fitdistcall by @sbfnk in https://github.com/epinowcast/primarycensored/pull/113 - Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensored/pull/114
- Update README by @github-actions in https://github.com/epinowcast/primarycensored/pull/115
- Issue #84: Prune not helpful to arg flow maths by @seabbs in https://github.com/epinowcast/primarycensored/pull/116
- Issue #82: Link between vignettes by @seabbs in https://github.com/epinowcast/primarycensored/pull/118
- Issue #69: Add check_truncation by @seabbs in https://github.com/epinowcast/primarycensored/pull/120
- Update README by @github-actions in https://github.com/epinowcast/primarycensored/pull/121
- Issue 109: Add explicit dist and primary arg usage to getting started by @seabbs in https://github.com/epinowcast/primarycensored/pull/122
- Issue 70: Restructure stan code by @seabbs in https://github.com/epinowcast/primarycensored/pull/123
- Issue 125: Update analytic solutions to deal with possible neg t values by @SamuelBrand1 in https://github.com/epinowcast/primarycensored/pull/126
- Issue 94: Add R and Stan for analytical Weibull by @seabbs in https://github.com/epinowcast/primarycensored/pull/109
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensored/pull/128
- Issue #108: Rename from primarycensoreddist to primarycensored by @seabbs in https://github.com/epinowcast/primarycensored/pull/130
- Update README by @github-actions in https://github.com/epinowcast/primarycensored/pull/132
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensored/pull/131
New Contributors
- @sbfnk made their first contribution in https://github.com/epinowcast/primarycensored/pull/113
Full Changelog: https://github.com/epinowcast/primarycensored/compare/v0.5.0...v0.6.0
- R
Published by seabbs over 1 year ago
primarycensored - primarycensoreddist 0.5.0
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 thestanandfitdistplusmodels. - Added a "How it works" vignette.
- Added R infrastructure for analytical solutions via the
primary_censored_distS3 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
Randstancode. - 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 https://github.com/epinowcast/primarycensoreddist/pull/74
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/78
- Issue 36: Add benchmarking of R, Stan, and fitdistdoublecens by @seabbs in https://github.com/epinowcast/primarycensoreddist/pull/79
- Issue 37 draft: Why it works vignette with analytic solutions by @SamuelBrand1 in https://github.com/epinowcast/primarycensoreddist/pull/68
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/81
- Issue 86: Fixes for "Why it works" vignette by @SamuelBrand1 in https://github.com/epinowcast/primarycensoreddist/pull/88
- Update README by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/89
- Issue 85: Add infrastructure for analytical solutions in R by @seabbs in https://github.com/epinowcast/primarycensoreddist/pull/87
- Update README by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/92
- Issue 85: Implement analytical solutions in R by @seabbs in https://github.com/epinowcast/primarycensoreddist/pull/90
- Issue 76: Add weibull distribution to analytic solutions in vignette by @SamuelBrand1 in https://github.com/epinowcast/primarycensoreddist/pull/93
- Issue 85: Analytical solutions in stan by @seabbs in https://github.com/epinowcast/primarycensoreddist/pull/95
- Update README by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/99
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/98
New Contributors
- @SamuelBrand1 made their first contribution in https://github.com/epinowcast/primarycensoreddist/pull/68
Full Changelog: https://github.com/epinowcast/primarycensoreddist/compare/v0.4.0...v0.5.0
- R
Published by seabbs over 1 year ago
primarycensored - primarycensoreddist 0.4.0
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 thefitdistrpluspackage. - Added low level tests for the Stan
primary_censored_odefunction. - 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
CmdStanmodel for fitting distributions using thecmdstanrpackage. - Added helpers functions for working with the new
CmdStanmodel and added an example to the vignette. - Added parameter recovery tests for the new
CmdStanmodel which tests theprimary_censored_dist_lpmffunction when used with NUTS based fitting.
Pull Requests
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/54
- Update README by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/57
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/56
- Bump peter-evans/create-pull-request from 6 to 7 by @dependabot in https://github.com/epinowcast/primarycensoreddist/pull/59
- Bump JamesIves/github-pages-deploy-action from 4.6.3 to 4.6.4 by @dependabot in https://github.com/epinowcast/primarycensoreddist/pull/60
- Issue 55: Add fitdistdoublecens wrapper by @seabbs in https://github.com/epinowcast/primarycensoreddist/pull/61
- Issue 34: rephrase integral as an ODE by @seabbs in https://github.com/epinowcast/primarycensoreddist/pull/64
- Issue 35 and 36: Package CmdStan model by @seabbs in https://github.com/epinowcast/primarycensoreddist/pull/67
Full Changelog: https://github.com/epinowcast/primarycensoreddist/compare/v0.3.0...v0.4.0
- R
Published by seabbs over 1 year ago
primarycensored - primarycensoreddist 0.3.0
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_lpmfwhen 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
primarycensoreddistandfitdistrpluspackages together to fit distributions. ## Pull requests - Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/42
- Better truncation handling by @seabbs in https://github.com/epinowcast/primarycensoreddist/pull/44
- Small suggestions on getting started vignette by @athowes in https://github.com/epinowcast/primarycensoreddist/pull/43
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/46
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/47
- Issue 13: fitdistrplus vignette by @seabbs in https://github.com/epinowcast/primarycensoreddist/pull/49
New Contributors
- @athowes made their first contribution in https://github.com/epinowcast/primarycensoreddist/pull/43
Full Changelog: https://github.com/epinowcast/primarycensoreddist/compare/v0.2.0...v0.3.0
- R
Published by seabbs over 1 year ago
primarycensored - primarycensoreddist 0.2.0
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 = 0torprimarycensoreddistto allow for non-secondary event censored distributions. - Adapted
rprimarycensoreddistso 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
cmdstanrpackage.
Pull requests
- Update README by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/18
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/20
- Update CITATION.cff by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/19
- Add swindow = 0 support for sampling from the primary censored distributions. by @seabbs in https://github.com/epinowcast/primarycensoreddist/pull/21
- Issue 15: Getting started vignette by @seabbs in https://github.com/epinowcast/primarycensoreddist/pull/22
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/24
- Issue 23: Switch sampling order to truncate and then censor by @seabbs in https://github.com/epinowcast/primarycensoreddist/pull/26
- Issue 14: Add using primarycensoreddist with stan vignette by @seabbs in https://github.com/epinowcast/primarycensoreddist/pull/27
- Update README by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/28
- Update README by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/30
- Issue 14: Fitting delay estimates using primarycensoreddist by @seabbs in https://github.com/epinowcast/primarycensoreddist/pull/33
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/39
- Update codemeta.json by @github-actions in https://github.com/epinowcast/primarycensoreddist/pull/40
New Contributors
- @seabbs made their first contribution in https://github.com/epinowcast/primarycensoreddist/pull/21
Full Changelog: https://github.com/epinowcast/primarycensoreddist/compare/v0.1.0...v0.2.0
- R
Published by seabbs over 1 year ago
primarycensored - primarycensoreddist 0.1.0
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.0release.
- R
Published by seabbs over 1 year ago