Description Usage Arguments Details Value Examples
Generate a list of matrices of transition probabilities computed with the transition matrices of individuals among pairs of cells detected by the network and specified probability input distributions per cell.
1 | rmatProb(n, nMNOmat, distNames, variation)
|
n |
number of matrices to generate |
nMNOmat |
transition matrix with the number of individuals displaced from cell to cell detected by the Mobile Network Operator |
distNames |
character vector with the names of the prior distributions for each cell |
variation |
list of lists whose components are parameters providing a measure of variation of each prior distribution |
The function generates the probabilities according to a Dirichlet distribution with
parameters generated by alphaPrior
. These parameters are generated with
distributions whose names are taken from the input parameter distNames
and construct the
corresponding prior distribution for each cell j with mode at u_{j}^{*}=N_{j}, where
N_{j} is taken from the sum of rows of nMNOmat
. Next the rest of parameters of the
distribution are computed according to the dispersion parameters specified in variation
.
As accepted distribution names, currently the user can specify unif
, degen
,
triang
, and gamma
.
The dispersion parameters recognised so far are the coefficients of variation only (standard
deviation divided by the mean of the distribution). These dispersion parameters must be
specified by a named component cv
with a numeric value in [0, 1].
For each distribution the parameters are computed as follows:
unif
: This is the uniform distribution with parameters xMax
and xMin
.
Both parameters are computed by u_{j}^{*}\cdot(1\pm√{3}\textrm{cv}), respectively, in
each cell j.
degen
: This is the degenerate distribution with parameter X0
taken as
u_{j}^{*} in each cell j.
triang
: This is the triangular distribution triang
with parameters
xMax
, xMin
, and xMode
. The latter is taken directly from nMNOfrom
.
The distribution is assumed to be symmetrical so that the two former parameters are computed by
u_{j}^{*}\cdot(1\pm√{3}\textrm{cv}), respectively, in each cell j.
gamma
: This is the gamma distribution with parameters shape
and scale
.
The former is computed as \frac{1}{\textrm{cv}^2} and the latter as
frac{u_{j}^{*}}{\textrm{scale} - 1}.
A list of n
matrices with transition probabilities
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.