This is the first major release of primarycensored
and has been submitted to CRAN.
primary_lpdf
.rhub
checks to the Github Actions
workflow.dependencies: "hard"
to the R-CMD-check
workflow to ensure checks pass without optional dependencies.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.
fitdistdoublecens()
by using withr
.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.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.primarycensored
as have all functions that use "dist" in their name.pdist
, dprimary
, rdist
, and rprimary
arguments in the getting started vignette to make it easier to link to mathematical details.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.
{touchstone}
based benchmarks for benchmarking R utility functions, and fitting the stan
and fitdistplus
models.primarycensored
S3 class.R
and stan
code.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 stan
model and improving the speed of the primarycensored_ode
function.
fitdistdoublecens()
to allow for fitting of double censored and truncated data using the fitdistrplus
package.primarycensored_ode
function.CmdStan
model for fitting distributions using the cmdstanr
package.CmdStan
model and added an example to the vignette.CmdStan
model which tests the primarycensored_lpmf
function when used with NUTS based fitting.This release fixes and improves truncation handling across the code base. It also adds a new vignette showcasing how to use the primarycensored
and fitdistrplus
packages together to fit distributions.
primarycensored_lpmf
when used for NUTS based fitting (i.e. in Stan).primarycensored
and fitdistrplus
packages together to fit distributions.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.
swindow = 0
to rprimarycensored
to allow for non-secondary event censored distributions.rprimarycensored
so that truncation is based on the primary censored distribution before secondary events are censored. This better matches the generative process.cmdstanr
.cmdstanr
package.This is the initial primarycensored
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.
0.2.0
release.