Description Usage Arguments Details Value See Also Examples
Compute the mode of the unnormalized posterior density function of the parameter λ in the hierarchical model to estimate population counts.
1 2 3 |
nMNO, |
nReg non-negative integer vectors with the number of individuals detected in each cell according to the network operator and the register |
fu, |
fv named lists with the prior marginal distributions of the two-dimensional points for the Monte Carlo integration |
flambda |
named list with the prior distribution of the lambda parameter |
relTol |
relative tolerance in the computation of the |
nSim |
number of two-dimensional points to generate to compute the integral. Default value
is |
nStrata |
integer vector of length 2 with the number of strata in each dimension. Default
value is |
verbose |
logical (default |
nThreads |
number (default the number of all cores, including logical cores) to use for computation |
The lengths of the input vectors nMNO
and nReg
must be equal. Currently
the optimization algorithm is a simple direct algorithm taking into account the form of the
density function.
The prior distributions are specified as named lists where the first component of each list must be the name of distribution ('unif', 'triang', 'degen', 'gamma') and the rest components must be named according to the name of the parameters of the random generator of the corresponding distribution according to:
unif: xMin
, xMax
for the minimum, maximum of the sampled interval.
degen: x0
for the degenerate value of the random variable.
triang: xMin
, xMax
, xMode
for minimum, maximum and mode (see
qtriang
).
gamma: scale
and shape
with the same meaning as in rgamma
.
modeLambda
returns a vector with the values of the mode of the density function
(column probLambda
) for each cell.
dlambda
for the function to maximize.
1 2 3 4 5 6 7 8 9 10 11 | # This data.table must have 5x3= 15 rows
modeLambda(nMNO = c(20, 17, 25), nReg = c(115, 123, 119),
fu = list(list('unif', xMin = 0.3, xMax = 0.5),
list('unif', xMin = 0.35, xMax = 0.45),
list('unif', xMin = 0.25, xMax = 0.43)),
fv = list(list('gamma', shape = 11, scale = 12),
list('gamma', shape = 12, scale = 12.3),
list('gamma', shape = 13, scale = 11.5)),
flambda = list(list('gamma', shape = 11, scale = 12),
list('gamma', shape = 12, scale = 12.3),
list('gamma', shape = 13, scale = 12)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.