NEXTNetR supports a series of pre-defined distributions for transmission and
recover/reset time, and also allows custom distributions to be defined
with userdefined_time. For exponential_time
, lognormal_time
, gamma_time
,
and weibull_time
the names reflect the shape of the transmission time density.
Except for exponential_time
, all these distributions have two parameters, and
are parametrized by their mean and variance. The additional parameter \(p_\infty\)
adds infinite times as a possible outcome with the specified probability, i.e
scales the density by \(1-p_\infty\) so that it is no longer normalized.
Instead of by their transmission time density, time distributions can alternatively
be thought of as being defined by their infectiousness function \(\lambda(\tau)\),
this is the case for polynomial_rate_time
and infectiousness_time
. In this case,
\(p_\infty\) is implicity defined by \(\lambda(\tau)\). See the discussion in
time_functions for how the two represenations are related.
Each time_distribution
object actually represents a two-parameer family
of distributions, see time_functions for a full discussion and for functions
that operate on time distribution objects.
Usage
exponential_time(lambda, p_infinity = 0)
lognormal_time(mean, var, p_infinity = 0)
gamma_time(mean, var, p_infinity = 0)
weibull_time(shape, scale, p_infinity = 0)
polynomial_rate_time(coeffs)
infectiousness_time(tau, lambda)
deterministic_time(tau)
Value
exponential_time(lambda, p_infinity)
. Returns a time distribution representing an exponential distribution with ratelambda
which in addition to finite values produces the value infinity with probabilityp_infinity
. This represents the case of constant infectiousness \(\lambda(\tau)=\lambda\).lognormal_time(mean, var, p_infinity)
. Returns a time distribution representing a Log-normal distribution with the givenmean
andvariance
, which in addition to finite values produces the value infinity with probabilityp_infinity
.gamma_time(mean, var, p_infinity)
. Returns a time distribution representing a Gamma distribution with the givenmean
andvariance
, which in addition to finite values produces the value infinity with probabilityp_infinity
.weibull_time(mean, var, p_infinity)
. Returns a time distribution representing a Weibull distribution with the givenshape
andscale
parameter, which in addition to finite values produces the value infinity with probabilityp_infinity
. The distribution has mean \(b \Gamma(1 + 1/a)\) and variance \(b^2(\Gamma(1 + 2/a) - \Gamma^2(1 + 1/a))\)for shape \(a\) and scale \(b\).polynomial_rate_time(coeffs)
. Distribution with survival function \(\Psi(\tau) = e^{-p(\tau)}\) for a polynomial infectiousness (hazard rate) \(p = c[1] + c[2] x + c[3] x^2 + \ldots\) with non-negative coefficients.infectiousness_time(tau, lambda)
. Distribution defined in term of the infectiousness function \(\lambda(\tau)\) specified for discrete points \(\tau_i, \lambda_i=\lambda(\tau_i)\) through vectorstau
andlambda
. The vectors must have the same length and be non-empty. In between the specified points, \(\lambda(\tau)\) is interpolated linearly. After the largest specified \(\tau_i\), the infectiousness \(\lambda(\tau)\) is assumed to be constant.deterministic_time(tau)
. Deterministic time with fixed valuetau