From 858833ed8e40670ba764d86530eaccfadfdbc943 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 21 Aug 2024 17:31:45 +0100 Subject: [PATCH] update README --- DESCRIPTION | 7 +- README.Rmd | 8 +- README.html | 707 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 226 +++++++++++++++++ 4 files changed, 940 insertions(+), 8 deletions(-) create mode 100644 README.html create mode 100644 README.md diff --git a/DESCRIPTION b/DESCRIPTION index ee16c11..5e978f1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,10 +1,13 @@ Package: primarycensoreddist -Title: Censored Distributions in R and Stan +Title: Primary Event Censored Distributions in R and Stan Version: 0.0.0.1000 Authors@R: person("Sam Abbott", , , "contact@samabbott.co.uk", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-8057-8037")) -Description: Censored distributions in R and Stan. +Description: This package provides both R functions for working with primary + event censored distributions and Stan implementations for use in Bayesian + modeling. Primary event censored distributions are useful for modeling + delayed reporting scenarios in epidemiology and other fields. License: MIT + file LICENSE URL: https://primarycensoreddist.epinowcast.org, https://github.com/epinowcast/primarycensoreddist/ diff --git a/README.Rmd b/README.Rmd index a7da98e..ac787d5 100644 --- a/README.Rmd +++ b/README.Rmd @@ -27,11 +27,7 @@ license](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/ ## Summary -```{r, results = "asis", echo=FALSE} -cat(gsub("\n[ ]+", " ", packageDescription("primarycensoreddist")$Description)) -``` - -This package provides both R functions for working with censored distributions and Stan implementations for use in Bayesian modeling. It offers a flexible framework for handling various types of censoring in both R and Stan environments. +This package provides both R functions for working with primary event censored distributions and Stan implementations for use in Bayesian modeling. Primary event censored distributions are useful for modeling delayed reporting scenarios in epidemiology and other fields. ## Installation @@ -104,7 +100,7 @@ Please briefly describe your problem and what output you expect in an [issue](ht ### Code of Conduct -Please note that the `epinowcast` project is released with a [Contributor Code of Conduct](https://github.com/epinowcast/.github/blob/main/CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms. +Please note that the `primarycensoreddist` project is released with a [Contributor Code of Conduct](https://github.com/epinowcast/.github/blob/main/CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms. ## Citation diff --git a/README.html b/README.html new file mode 100644 index 0000000..4997ee4 --- /dev/null +++ b/README.html @@ -0,0 +1,707 @@ + + + + + + + + + + + + + + + + + + + + + +

Censored Distributions in R and Stan primarycensoreddist website

+ + +

Lifecycle: experimental R-CMD-check Codecov test coverage Universe MIT license GitHub contributors

+ + +

Summary

+

This package provides both R functions for working with primary event censored distributions and Stan implementations for use in Bayesian modeling. Primary event censored distributions are useful for modeling delayed reporting scenarios in epidemiology and other fields.

+

Installation

+
+ +Installing the package + +

You can install the latest released version using the normal R function, though you need to point to r-universe instead of CRAN:

+
install.packages(
+  "primarycensoreddist", repos = "https://epinowcast.r-universe.dev"
+)
+

Alternatively, you can use the remotes package to install the development version from Github (warning! this version may contain breaking changes and/or bugs):

+
remotes::install_github(
+  "epinowcast/primarycensoreddist", dependencies = TRUE
+)
+

Similarly, you can install historical versions by specifying the release tag (e.g. this installs 0.2.0):

+
remotes::install_github(
+  "epinowcast/primarycensoreddist", dependencies = TRUE, ref = "v0.2.0"
+)
+

Note: You can also use that last approach to install a specific commit if needed, e.g. if you want to try out a specific unreleased feature, but not the absolute latest developmental version.

+
+ +
+ +Installing CmdStan (optional for Stan functionality) + +

If you wish to use the Stan functions, you will need to install CmdStan, which also entails having a suitable C++ toolchain setup. We recommend using the cmdstanr package. The Stan team provides instructions in the Getting started with cmdstanr vignette, with other details and support at the package site along with some key instructions available in the Stan resources package vignette, but the brief version is:

+
# if you not yet installed `primarycensoreddist`, or you installed it without
+# `Suggests` dependencies
+install.packages(
+  "cmdstanr",
+  repos = c("https://mc-stan.org/r-packages/", getOption("repos"))
+)
+# once `cmdstanr` is installed:
+cmdstanr::install_cmdstan()
+

Note: You can speed up CmdStan installation using the cores argument. If you are installing a particular version of epinowcast, you may also need to install a past version of CmdStan, which you can do with the version argument.

+
+ +

Resources

+

We provide a range of other documentation, case studies, and community spaces to ask (and answer!) questions:

+
+ +Package Website + +

The primarycensoreddist website includes a function reference, model outline, and case studies using the package. The site mainly concerns the release version, but you can also find documentation for the latest development version.

+
+ +
+ +Vignettes + +

We have created package vignettes to help you get started with primarycensoreddist and to highlight other features with case studies.

+
+ +
+ +Organisation Website + +

Our organisation website includes links to other resources, guest posts, and seminar schedule for both upcoming and past recordings.

+
+ +
+ +Community Forum + +

Our community forum has areas for question and answer and considering new methods and tools, among others. If you are generally interested in real-time analysis of infectious disease, you may find this useful even if do not use primarycensoreddist.

+
+ +

Contributing

+

We welcome contributions and new contributors! We particularly appreciate help on identifying and identified issues. Please check and add to the issues, and/or add a pull request and see our contributing guide for more information.

+

If you need a different underlying model for your work: primarycensoreddist provides a flexible framework for censored distributions in both R and Stan. If you implement new distributions or censoring mechanisms that expand the overall flexibility or improve the defaults, please let us know either here or on the community forum. We always like to hear about new use-cases and extensions to the package.

+

How to make a bug report or feature request

+

Please briefly describe your problem and what output you expect in an issue. If you have a question, please don’t open an issue. Instead, ask on our Q and A page. See our contributing guide for more information.

+

Code of Conduct

+

Please note that the primarycensoreddist project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

+

Citation

+

If making use of our methodology or the methodology on which ours is based, please cite the relevant papers from our model outline. If you use primarycensoreddist in your work, please consider citing it with citation("primarycensoreddist").

+

Contributors

+ + + + + + +

All contributions to this project are gratefully acknowledged using the allcontributors package following the all-contributors specification. Contributions of any kind are welcome!

+

Code

+

Issue Authors

+

Issue Contributors

+ + + + + + + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..8c5fff3 --- /dev/null +++ b/README.md @@ -0,0 +1,226 @@ + + + +# Censored Distributions in R and Stan primarycensoreddist website + + + +[![Lifecycle: +experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental) +[![R-CMD-check](https://github.com/epinowcast/primarycensoreddist/workflows/R-CMD-check/badge.svg)](https://github.com/epinowcast/primarycensoreddist/actions/workflows/R-CMD-check.yaml) +[![Codecov test +coverage](https://codecov.io/gh/epinowcast/primarycensoreddist/branch/main/graph/badge.svg)](https://app.codecov.io/gh/epinowcast/primarycensoreddist) +[![Universe](https://epinowcast.r-universe.dev/badges/primarycensoreddist)](https://epinowcast.r-universe.dev/primarycensoreddist) +[![MIT +license](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/epinowcast/primarycensoreddist/blob/master/LICENSE.md/) +[![GitHub +contributors](https://img.shields.io/github/contributors/epinowcast/primarycensoreddist)](https://github.com/epinowcast/primarycensoreddist/graphs/contributors) + + +## Summary + +This package provides both R functions for working with primary event +censored distributions and Stan implementations for use in Bayesian +modeling. Primary event censored distributions are useful for modeling +delayed reporting scenarios in epidemiology and other fields. + +## Installation + +
+ +Installing the package + +You can install the latest released version using the normal `R` +function, though you need to point to `r-universe` instead of CRAN: + +``` r +install.packages( + "primarycensoreddist", repos = "https://epinowcast.r-universe.dev" +) +``` + +Alternatively, you can use the [`remotes` +package](https://remotes.r-lib.org/) to install the development version +from Github (warning\! this version may contain breaking changes and/or +bugs): + +``` r +remotes::install_github( + "epinowcast/primarycensoreddist", dependencies = TRUE +) +``` + +Similarly, you can install historical versions by specifying the release +tag (e.g. this installs +[`0.2.0`](https://github.com/epinowcast/primarycensoreddist/releases/tag/v0.2.0)): + +``` r +remotes::install_github( + "epinowcast/primarycensoreddist", dependencies = TRUE, ref = "v0.2.0" +) +``` + +*Note: You can also use that last approach to install a specific commit +if needed, e.g. if you want to try out a specific unreleased feature, +but not the absolute latest developmental version.* + +
+ +
+ +Installing CmdStan (optional for Stan functionality) + +If you wish to use the Stan functions, you will need to install +[CmdStan](https://mc-stan.org/users/interfaces/cmdstan), which also +entails having a suitable C++ toolchain setup. We recommend using the +[`cmdstanr` package](https://mc-stan.org/cmdstanr/). The Stan team +provides instructions in the [*Getting started with +`cmdstanr`*](https://mc-stan.org/cmdstanr/articles/cmdstanr.html) +vignette, with other details and support at the [package +site](https://mc-stan.org/cmdstanr/) along with some key instructions +available in the [Stan resources package +vignette](https://package.epinowcast.org/articles/stan-help.html#toolchain), +but the brief version is: + +``` r +# if you not yet installed `primarycensoreddist`, or you installed it without +# `Suggests` dependencies +install.packages( + "cmdstanr", + repos = c("https://mc-stan.org/r-packages/", getOption("repos")) +) +# once `cmdstanr` is installed: +cmdstanr::install_cmdstan() +``` + +*Note: You can speed up CmdStan installation using the `cores` argument. +If you are installing a particular version of `epinowcast`, you may also +need to install a past version of CmdStan, which you can do with the +`version` argument.* + +
+ +## Resources + +We provide a range of other documentation, case studies, and community +spaces to ask (and answer\!) questions: + +
+ +Package Website + +The [`primarycensoreddist` +website](https://primarycensoreddist.epinowcast.org/) includes a +function reference, model outline, and case studies using the package. +The site mainly concerns the release version, but you can also find +documentation for [the latest development +version](https://primarycensoreddist.epinowcast.org/dev/). + +
+ +
+ +Vignettes + +We have created [package +vignettes](https://primarycensoreddist.epinowcast.org/articles) to help +you get started with primarycensoreddist and to highlight other features +with case studies. + +
+ +
+ +Organisation Website + +Our [organisation website](https://www.epinowcast.org/) includes links +to other resources, [guest posts](https://www.epinowcast.org/blog.html), +and [seminar schedule](https://www.epinowcast.org/seminars.html) for +both upcoming and past recordings. + +
+ +
+ +Community Forum + +Our [community forum](https://community.epinowcast.org/) has areas for +[question and answer](https://community.epinowcast.org/c/interface/15) +and [considering new methods and +tools](https://community.epinowcast.org/c/projects/11), among others. If +you are generally interested in real-time analysis of infectious +disease, you may find this useful even if do not use +`primarycensoreddist`. + +
+ +## Contributing + +We welcome contributions and new contributors\! We particularly +appreciate help on [identifying and identified +issues](https://github.com/epinowcast/primarycensoreddist/issues). +Please check and add to the issues, and/or add a [pull +request](https://github.com/epinowcast/primarycensoreddist/pulls) and +see our [contributing +guide](https://github.com/epinowcast/.github/blob/main/CONTRIBUTING.md) +for more information. + +If you need a different underlying model for your work: +`primarycensoreddist` provides a flexible framework for censored +distributions in both R and Stan. If you implement new distributions or +censoring mechanisms that expand the overall flexibility or improve the +defaults, please let us know either here or on the [community +forum](https://community.epinowcast.org/). We always like to hear about +new use-cases and extensions to the package. + +### How to make a bug report or feature request + +Please briefly describe your problem and what output you expect in an +[issue](https://github.com/epinowcast/primarycensoreddist/issues). If +you have a question, please don’t open an issue. Instead, ask on our [Q +and A +page](https://github.com/epinowcast/primarycensoreddist/discussions/categories/q-a). +See our [contributing +guide](https://github.com/epinowcast/.github/blob/main/CONTRIBUTING.md) +for more information. + +### Code of Conduct + +Please note that the `primarycensoreddist` project is released with a +[Contributor Code of +Conduct](https://github.com/epinowcast/.github/blob/main/CODE_OF_CONDUCT.md). +By contributing to this project, you agree to abide by its terms. + +## Citation + +If making use of our methodology or the methodology on which ours is +based, please cite the relevant papers from our [model +outline](https://package.epinowcast.org/articles/model.html). If you use +`primarycensoreddist` in your work, please consider citing it with +`citation("primarycensoreddist")`. + +## Contributors + + + + + + + +All contributions to this project are gratefully acknowledged using the +[`allcontributors` +package](https://github.com/ropenscilabs/allcontributors) following the +[all-contributors](https://allcontributors.org) specification. +Contributions of any kind are welcome\! + +### Code + +### Issue Authors + +### Issue Contributors + + + + + +