ngstan
provides Stan implementations of statistical models for the analysis of Next Generation Sequencing (NGS) data. ngstan
uses the cmdstanr
and instantiate
packages to provide pre-compiled Stan models that can be fit using a variety of sampling algorithms available with cmdstanr
(e.g. ADVI and Pathfinder), in addition to the NUTS sampler.
Installing ngstan
The ngstan
package depends on the R package CmdStanR
and the command line tool CmdStan
, so it is important to follow these steps in order:
- Install the R package
CmdStanR
.CmdStanR
is not on CRAN, so the recommended way to install it isinstall.packages("cmdstanr", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
. - Optional: set environment variables
CMDSTAN_INSTALL
and/orCMDSTAN
to manage theCmdStan
installation. - Install
ngstan
using the R command below.
Type | Source | Command |
---|---|---|
Development | GitHub | remotes::install_github("dcannonwalker/ngstan") |