The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Introduction to the time-varying geometric distribution

Luke Zachmann

Vincent Landau

Dec 04 , 2019

The time-varying geometric distribution has parameter \(\boldsymbol{\mathbf{\phi}}\) and support from 1 to n + 1, where n =. If \(x\sim tvgeom(prob)\), \(x = n + 1\) when the event does not occur in the first \(n\) trials. It has probability mass function

\[ f(x =1 \mid \boldsymbol{\mathbf{\phi}}) = \phi_x \] \[ f(x = i \mid \boldsymbol{\mathbf{\phi}}, 1<i\leq n ) = \phi_i\prod_{j = 1}^{i-1}(1 - \phi_j) \] \[ f(x = n + 1 \mid \boldsymbol{\mathbf{\phi}}) = \prod_{j = 1}^{n}(1 - \phi_j) \]

Description of the tvgeom distribution

The time-varying geometric distribution is derived from the geometric distribution, a discrete probability distribution used in econometrics, ecology, etc. Whereas the geometric distribution has a constant probability of success over time and has no upper bound of support, the time-varying geometric distribution has a probability of success that changes over time. Additionally, to accommodate situations in which the event can only occur in \(n\) days, after which success can not occur, the time-varying geometric distribution is right-truncated (i.e. it has a maximum possible value determined by the length of \(\boldsymbol{\mathbf{\phi}}\) above.

In-depth example

First let’s load the packages we need.

Next, let’s define a few functions, some wrappers, and the set of scenarios over which we hope to iterate in order to develop some sort of intuition.

Scenarios…
n x0 L_min L_max k scenario
100 60 0 0.10 -0.2 1
100 60 0 0.10 0.0 2
100 60 0 0.10 0.5 3
100 60 0 0.25 -0.2 4
100 60 0 0.25 0.0 5
100 60 0 0.25 0.5 6
100 60 0 0.70 -0.2 7
100 60 0 0.70 0.0 8
100 60 0 0.70 0.5 9

Next, let’s use some dplyr/purrr magic to develop data we can plot to show the effects of the various scenarios above.

Plots of the results Rate of change.

Max probability of success.

Max probability of success.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.