-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
89 lines (64 loc) · 3.06 KB
/
README.Rmd
File metadata and controls
89 lines (64 loc) · 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, echo = FALSE, message=FALSE, results='hide'}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.align = "center",
fig.path = "man/figures/README-",
echo = TRUE,
fig.width = 8,
fig.height = 6
)
```
<!-- badges: start -->
[](https://CRAN.R-project.org/package=trending)
[](https://app.codecov.io/gh/reconverse/trending?branch=master)
[](https://github.com/reconverse/trending/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
# Trending
*trending* aims to provides a coherent interface to several modelling tools.
Whilst it is useful in an interactive context, it's main focus is to provide
an intuitive interface on which other packages can be developed
(e.g. [*trendbreaker*](https://github.com/reconhub/trendbreaker)).
## Installing the package
You can install the stable version from [CRAN](https://CRAN.R-project.org) with:
```{r, eval=FALSE}
install.packages("trending")
```
The development version can be installed from [GitHub](https://github.com/) with:
```{r, eval=FALSE}
if (!require(remotes)) {
install.packages("remotes")
}
remotes::install_github("reconverse/trending", build_vignettes = TRUE)
```
## Main features
- **Model specification:** Interfaces to common models through intuitive
functions; `lm_model()`, `glm_model()`, `glm_nb_model` and `brms_model`*.
- **Model fitting and prediction:** Once specified, models can be fit to data
and generate confidence and prediction intervals for future data using `fit()`
and `predict()`.
- **Error and warning catching:** The provided methods for `fit` and `predict`
catch all warnings and errors, returning the output and these captured values
in a list.
\* Requires [brms](https://CRAN.R-project.org/package=brms)
# Resources
## Vignettes
An overview of *trending* is provided in the included vignette:
* `vignette("Introduction", package = "trending")`
## Getting help online
Bug reports and feature requests should be posted on *github* using the
[*issue* system](https://github.com/reconverse/trending/issues). All other
questions should be posted on the **RECON** slack channel see
<https://www.repidemicsconsortium.org/forum/> for details on how to join.
# Acknowledgements
* Gavin Simpson; Our method to calculate prediction intervals follows one that
he described in two posts on his [blog](https://fromthebottomoftheheap.net);
see [part 1](https://fromthebottomoftheheap.net/2017/05/01/glm-prediction-intervals-i/)
and [part 2](https://fromthebottomoftheheap.net/2017/05/01/glm-prediction-intervals-ii/).
* John Haman and Matthew Avery; Our implementation of prediction intervals was
guided by their bootstrapped approach within the
[ciTools](https://CRAN.R-project.org/package=ciTools) package.