Description Usage Arguments Details Value See Also Examples
Compute the unnormalized posterior density function of the parameter λ in the hierarchical model.
1 2 |
lambda |
values of the parameter λ |
u |
values of the parameter u |
v |
values of the parameter v |
nMNO |
non-negative integer vectors with the number of individuals detected according to the network operator |
fu |
named list with the prior marginal distributions of the hyperparameter u |
fv |
named list with the prior marginal distributions of the hyperparameter v |
flambda |
named list with the prior marginal distribution of the parameter λ |
relTol |
relative tolerance in the computation of the |
nThreads |
number (default the number of all cores, including logical cores) to use for computation |
The prior distributions are specified as named lists where the first component of each list must be the name of distribution ('unif', 'triang', 'gamma') and the rest components must be named according to the name of the parameters of the density/probability function of the corresponding distribution according to:
unif: xMin
, xMax
for the minimum, maximum of the sampled interval.
triang: xMin
, xMax
, xMode
for minimum, maximum and mode (see
qtriang
).
gamma: scale
and shape
with the same meaning as in rgamma
.
duvlambda
returns the probability mass function of the number of indviduals
detected by the mobile network operator according to the hierarchical model. It depends on priors
for the parameters
u
,
v
,
λ
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | f <- function(x){duvlambda(x, 0.346, 97, 19,
fu = list('unif', xMin = 0.3, xMax = 0.4),
fv = list('unif', xMin = 90, xMax = 105),
flambda = list('gamma', shape = 11, scale = 97 / 10))$prob}
curve(f, 0, 150)
f <- function(x){duvlambda(70, x, 97, 19,
fu = list('unif', xMin = 0.3, xMax = 0.4),
fv = list('unif', xMin = 90, xMax = 105),
flambda = list('gamma', shape = 11, scale = 97 / 10))$prob}
curve(f, 0, 1)
f <- function(x){duvlambda(70, 0.35, x, 19,
fu = list('unif', xMin = 0.3, xMax = 0.4),
fv = list('unif', xMin = 90, xMax = 105),
flambda = list('gamma', shape = 11, scale = 97 / 10))$prob}
curve(f, 80, 115)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.