Learn R Programming

Summary

This R package lets you make estimates (with confidence intervals) using a generalized additive model (GAM) with penalized basis splines (P-splines). It was initiall developed for infectious disease outbreak research, but it applies to other domains as well.

This package can handle two types of estimates:

  • Scalar estimates, in which a single numerical outcome is calculated from the system (for example, the time when an infectious disease outbreak reaches its peak)
  • Time series estimates, in which a time series of outcomes is calculated from the system (for example, the cumulative incidence during an outbreak).

Installation

install.packages('pspline.inference')
library(pspline.inference)

How to use

See package documentation in R — ?pspline.inference — for more information, as well as the package vignette — vignette('seasonal', package="pspline.inference").

Revision history

  • v0.24: Documentation improvements
  • v0.23: Initial CRAN release

Copy Link

Version

Install

install.packages('pspline.inference')

Monthly Downloads

59

Version

1.0.4

License

Apache License 2.0

Issues

Pull Requests

Stars

Forks

Maintainer

Ben Artin

Last Published

January 19th, 2021

Functions in pspline.inference (1.0.4)

confints.outcomes

Calculate confidence intervals of model outcome variables
pspline.estimate.timeseries

Calculates confidence intervals for time series sampled from generalized additive (mixed) model of an outbreak
check.scalars

Assess whether scalar estimates fall within their intended confidence intervals
pspline.confints.timeseries

pspline.outbreak.cumcases

Calculate cumulative incidence for an outbreak
pspline.outbreak.cumcases.relative

Calculate relative incidence for an outbreak
pspline.sample.scalars

Runs simulations on an outbreak GAM/GAMM for the purpose of estimating scalar outbreak outcomes, and returns estimated scalar outcome values for each simulation.
pspline.outbreak.thresholds

Calculate outbreak thresholds for an outbreak
pspline.validate.scalars

Run a simulation study to validate a scalar estimator
pspline.outbreak.calc.cumcases

Calculate cumulative incidence time series from incidence time series
pspline.outbreak.cases

Calculate cumulative incidence for an outbreak
pspline.sample.timeseries

Runs simulations on an outbreak GAM/GAMM for the purpose of estimating time series outbreak outcomes, and returns estimated time series outcomes for each simulation.
pspline.confints.scalars

pspline.estimate.scalars

Calculates confidence intervals for scalars estimated from generalized additive (mixed) model of an outbreak
truth.results.scalars

Run simulation study on one truth
quantile.outcomes

Calculate quantiles of model outcome variables
sample.params

Sample spline parameters
pspline.inference

Inference using penalized basis splines (P-splines) in a generalized additive model (GAM), with applications in infectious disease outbreak modeling
observed.results.scalars

Run simulation study on one set of observations
eval.model

Eval model prediction with given model params at given predictors
ecdf.outcomes

Return empirical CDF for model outcome variables