Methods to compute delay distributions from summary statistics
Prerequisites
R
R (≥ 4.0.0) is required. Download it from CRAN.
Stan
Several functions in this package use Stan via the rstan package. Stan requires a working C++ toolchain:
- Windows: Install Rtools and follow the RStan Getting Started guide.
-
macOS: Install the Xcode Command Line Tools (
xcode-select --install) and follow the RStan Getting Started guide. -
Linux: Ensure
g++andmakeare available (e.g.sudo apt install build-essentialon Debian/Ubuntu), then install rstan normally.
Install rstan from CRAN once the toolchain is ready:
install.packages("rstan")Verify the installation works by running the built-in example:
example(stan_model, package = "rstan", run.dontrun = TRUE)Installation
Install the development version of ddsynth directly from GitHub using either remotes or pak:
# Using remotes (install remotes first if needed)
install.packages("remotes")
remotes::install_github("cm401/ddsynth")
# Alternatively, using pak
install.packages("pak")
pak::pkg_install("cm401/ddsynth")