![]() |
EpiNow2 Stan Functions
|
Functions for probability mass function handling. More...
Functions | |
vector | discretised_pmf (vector params, int n, int dist) |
Functions for probability mass function handling.
Functions from pmfs.stan for handling and manipulating probability mass functions.
vector discretised_pmf | ( | vector | params, |
int | n, | ||
int | dist ) |
#include </github/workspace/inst/stan/functions/pmfs.stan>
Probability Mass Function (PMF) Utilities
This file contains functions for creating and manipulating probability mass functions, particularly for discretizing continuous distributions for use in delay modeling. Discretise a continuous distribution
This function discretizes continuous distributions (lognormal or gamma) to create a probability mass function over discrete time points (days). Adapted from https://github.com/epiforecasts/epinowcast (MIT License, copyright: epinowcast authors)
params | Vector of distribution parameters ([mu, sigma] for lognormal or [shape, rate] for gamma) |
n | Number of days to calculate PMF for |
dist | Distribution type (0: lognormal, 1: gamma) |
Definition at line 26 of file pmfs.stan.
Referenced by get_delay_rev_pmf().