trending v0.0.2


Monthly downloads



Model Temporal Trends

Provides a coherent interface to multiple modelling tools for fitting trends along with a standardised approach for generating confidence and prediction intervals.


Project Status: WIP – Initial development is in progress, but there
has not yet been a stable, usable release suitable for the
public. Lifecycle:
experimental CRAN
status Codecov test
coverage R build


This package is a work in progress. Version 0.1.0 has been released to get wider feedback from the community. Please reach out to the authors should you have any problems.


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).

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().

* Requires brms

Installing the package

Once it is released on CRAN, you will be able to install the stable version of the package with:


The development version can be installed from GitHub with:

if (!require(remotes)) {
remotes::install_github("reconhub/trending", build_vignettes = TRUE)



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. All other questions should be posted on the RECON slack channel see for details on how to join.


  • Gavin Simpson; Our method to calculate prediction intervals follows one that he described in two posts on his blog; see part 1 and part 2.

  • John Haman and Matthew Avery; Our implementation of prediction intervals was guided by their bootstrapped approach within the ciTools package.

Functions in trending

Name Description
trending_model_fit_accessors Accessors for trending_model_fit objects
trending_model_accessors Accessors for trending_model objects
trending_model_fit-prediction Predict methods
fit Fitting for trending_model objects
trending_model Modeling interface
No Results!

Vignettes of trending

No Results!

Last month downloads


License MIT + file LICENSE
Encoding UTF-8
LazyData true
RoxygenNote 7.1.1
VignetteBuilder knitr
NeedsCompilation no
Packaged 2020-11-18 13:26:16 UTC; tim
Repository CRAN
Date/Publication 2020-11-18 20:30:02 UTC

Include our badge in your README