Skip to contents

Time distribution objects are used to specify the distribution of transmission and recovery/reset times. In principle, time distribution can represent any distribution on \([0,\infty]\), where the value \(\infty\) indicates that no transmission respectively recovery/reset takes place. See time_distributions for functions to create objects representing common time distributions such as lognormal, gamma, etc. Each time distribution object actually represents a two-parameter family of distributions with parameters \(t\) and \(m\), see Details for a full discussion.

Usage

time_sample(n, timedistribution, t = 0, m = 1)

time_density(timedistribution, tau, t = 0, m = 1)

time_hazardrate(timedistribution, tau)

time_survivalprobability(timedistribution, tau, t = 0, m = 1)

time_survivalquantile(timedistribution, p, t = 0, m = 1)

Arguments

n

number of samples to draw

timedistribution

a time_distribution.

t

the conditioning time, see details

m

multiplicity, see details

tau

non-negative time

Value

  • time_sample(n, timedistribution, t, m). Samples n values from distribution \(\Psi_{t,m}\).

  • time_density(timedistribution, tau, t, m). Evaluates the density at points tau of distribution \(\Psi_{t,m}\).

  • time_hazardrate(timedistribution, tau). Evaluates the hazardrate \(\lambda(\tau)\) of the base distribution \(\Psi\). The hazard rate of \(\Psi_{t,m}\) is simply \(m\lambda(\tau)\), see Details.

  • time_survivalprobability(timedistribution, tau, t, m). Evaluates the survivalfunction \(\Psi_{t,m}\) at points tau.

  • time_survivalquantile(timedistribution, p, t, m). Computes the \(p\)-quantiles of distribution \(\Psi_{t,m}\).

Details

Each time distribution object actually represents a two-parameter family of distributions with parameters \(t\) and \(m\). This family is defined in terms of a base distribution with some survival function \(\Psi(\tau) = \exp\big(-\int_0^\tau \lambda(t) dt\big)\). Note that assuming this form of the survival function does not restrict the choice of base distributions; any distribution on \([0,\infty]\) takes this form for \(\lambda(\tau) := -\Psi'(\tau) / \Psi(\tau)\). \(\lambda(\tau)\) is called the hazard rate at time \(\tau\).

In terms of hazard rate \(\lambda(\tau)\), the distribution \(\Psi(\tau)\) is naturally interpreted as the time until the first event fired by an inhomogeneous Poisson process with rate function \(\lambda(\tau)\). If \(\int_0^\tau \lambda(t) dt = \Lambda < \infty\) for all \(\tau\), then the process does not necessarily fire and the distribution takes value \(\infty\) with positive probability \(p_\infty = e^{-\Lambda}\).

Parameter \(m\) modulates the rate function \(\lambda(\tau)\), and parameter \(t\) conditions the process to fire after time \(t\). Note that for conditioned distributions, \(\tau\) is expressed relative to \(t\), i.e. the domain of \(\tau\) is always \([0,\infty]\). The survival function of the modulates and conditioned distribution is \(\Psi_{t,m}(\tau) = \exp\big(-\int_t^{t+\tau} m \lambda(t) dt\big)\).

For integral \(m\), modulation can be interpreted as taking the minimum of \(m\) i.i.d. copies of the unmodulated distribution. This is used by some simulation algorithms to efficiently handle nodes with large numbers of edges. Parameter \(m\) is also used when simulating on weighted networks, where it represents the weight of an edge.