Skip to content

Commit

Permalink
update namespace and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
seabbs committed Dec 10, 2023
1 parent 8c46b12 commit 5c9ffbf
Show file tree
Hide file tree
Showing 11 changed files with 244 additions and 92 deletions.
6 changes: 0 additions & 6 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export(filter_obs_by_obs_time)
export(filter_obs_by_ptime)
export(filtered_censoring_adjusted_delay)
export(filtered_naive_delay)
export(get_targets_archive)
export(latent_censoring_adjusted_delay)
export(latent_truncation_censoring_adjusted_delay)
export(linelist_to_cases)
Expand All @@ -39,9 +38,6 @@ export(primary_censoring_bias_correction)
export(reverse_obs_at)
export(sample_epinowcast_model)
export(sample_model)
export(save_csv)
export(save_dataset)
export(save_rds)
export(simulate_double_censored_pmf)
export(simulate_exponential_cases)
export(simulate_gillespie)
Expand All @@ -51,9 +47,7 @@ export(summarise_draws)
export(summarise_variable)
export(truncation_adjusted_delay)
export(truncation_censoring_adjusted_delay)
export(upload_targets_archive)
import(brms)
import(cmdstanr)
import(data.table)
import(ggplot2)
importFrom(ggplot2,ggsave)
218 changes: 218 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@

# Estimate epidemiological delay distributions for infectious diseases<a href='https://epidist.epinowcast.org'><img src='man/figures/logo.png' align="right" height="139" /></a>

<!-- badges: start -->

[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![R-CMD-check](https://github.com/epinowcast/epidist/workflows/R-CMD-check/badge.svg)](https://github.com/epinowcast/epidist/actions/workflows/R-CMD-check.yaml)
[![Codecov test
coverage](https://codecov.io/gh/epinowcast/epidist/branch/main/graph/badge.svg)](https://app.codecov.io/gh/epinowcast/epidist)
</br>
[![Universe](https://epinowcast.r-universe.dev/badges/epidist)](https://epinowcast.r-universe.dev/epidist)
[![MIT
license](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/epinowcast/epidist/blob/master/LICENSE.md/)
[![GitHub
contributors](https://img.shields.io/github/contributors/epinowcast/epidist)](https://github.com/epinowcast/epidist/graphs/contributors)
</br>
[![DOI](https://zenodo.org/badge/422611952.svg)](https://zenodo.org/badge/latestdoi/422611952)
<!-- badges: end -->

*Warning: This package is a prototype and is under active development.
Breaking changes are likely.*

## Summary

Understanding and accurately estimating epidemiological delay
distributions is important for public health policy. These estimates
directly influence epidemic situational awareness, control strategies,
and resource allocation. In this package, we provide methods to address
the key challenges in estimating these distributions, including
truncation, interval censoring, and dynamical biases. Despite their
importance, these issues are frequently overlooked, often resulting in
biased conclusions.

## Installation

<details>

<summary>Installing the package</summary>

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(
"epidist", 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/epidist", dependencies = TRUE
)
```

Similarly, you can install historical versions by specifying the release
tag (e.g. this installs
[`0.1.0`](https://github.com/epinowcast/epidist/releases/tag/v0.1.0)):

``` r
remotes::install_github(
"epinowcast/epidist", 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.*

</details>

<details>

<summary>Installing CmdStan</summary>

If you wish to do model fitting and nowcasting, 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/), but the brief version is:

``` r
# if you not yet installed `epinowcast`, 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.*

</details>

<details>

<summary>Alternative: Docker</summary>

We also provide a [Docker](https://www.docker.com/get-started/) image
with [`epinowcast` and all dependencies
installed](https://github.com/orgs/epinowcast/packages/container/package/epidist).
You can use this image to run `epidist` without installing dependencies.

</details>

## Resources

As you use the package, the documentation available via `?enw_` should
be your first stop for troubleshooting. We also provide a range of other
documentation, case studies, and community spaces to ask (and answer\!)
questions:

<details>

<summary>Package Website</summary>

The [`epinowcast` website](https://package.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://package.epinowcast.org/dev/).

</details>

<details>

<summary>R Vignettes</summary>

We have created [package
vignettes](https://package.epinowcast.org/articles) to help you [get
started
nowcasting](https://package.epinowcast.org/articles/epinowcast.html) and
to [highlight other features with case
studies](https://package.epinowcast.org/articles/germany-age-stratified-nowcasting.html).

</details>

<details>

<summary>Organisation Website</summary>

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.

</details>

<details>

<summary>Community Forum</summary>

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 `epinowcast`.

</details>

<details>

<summary>Package Analysis Scripts</summary>

In addition to the vignettes, the package also comes with [example
analyses](https://github.com/epinowcast/epinowcast/tree/main/inst/examples).
These are not as polished as the vignettes, but we typically explore new
features with these and they may help you if you are using a development
version. After installing `epinowcast`, you can find them via:

``` r
list.files(
system.file("examples", package = "epinowcast"), full.names = TRUE
)
```

</details>

## Contributing

We welcome contributions and new contributors\! We particularly
appreciate help on [identifying and identified
issues](https://github.com/epinowcast/epidist/issues). Please check and
add to the issues, and/or add a [pull
request](https://github.com/epinowcast/epidist/pulls) and see our
[contributing guide](CONTRIBUTING.md) for more information.

### 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/epidist/issues). If you have a
question, please don’t open an issue. Instead, ask on our [Q and A
page](https://github.com/epinowcast/dist/discussions/categories/q-a).
See our [contributing guide](CONTRIBUTING.md) for more information.

### Code of Conduct

Please note that the `epidist` project is released with a [Contributor
Code of Conduct](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://epidist.epinowcast.org/articles/model.html). If you use
`epidist` in your work, please consider citing it with
`citation("epidist")`.
15 changes: 0 additions & 15 deletions man/dynamicaltruncation-package.Rd

This file was deleted.

20 changes: 20 additions & 0 deletions man/epidist-package.Rd

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

11 changes: 0 additions & 11 deletions man/get_targets_archive.Rd

This file was deleted.

11 changes: 0 additions & 11 deletions man/save_csv.Rd

This file was deleted.

11 changes: 0 additions & 11 deletions man/save_dataset.Rd

This file was deleted.

11 changes: 0 additions & 11 deletions man/save_plot.Rd

This file was deleted.

11 changes: 0 additions & 11 deletions man/save_rds.Rd

This file was deleted.

11 changes: 6 additions & 5 deletions man/simulate_double_censored_pmf.Rd

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

11 changes: 0 additions & 11 deletions man/upload_targets_archive.Rd

This file was deleted.

0 comments on commit 5c9ffbf

Please sign in to comment.