modeLambda: Mode of the posterior density function of the lambda...

Description Usage Arguments Details Value See Also Examples

Description

Compute the mode of the unnormalized posterior density function of the parameter λ in the hierarchical model to estimate population counts.

Usage

1
2
3
modeLambda(nMNO, nReg, fu, fv, flambda, relTol = 1e-06, nSim = 10000,
  nStrata = c(1, 100), verbose = FALSE,
  nThreads = RcppParallel::defaultNumThreads())

Arguments

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 kummer function. Default value is 1e-6

nSim

number of two-dimensional points to generate to compute the integral. Default value is 1e4

nStrata

integer vector of length 2 with the number of strata in each dimension. Default value is c(1, 1e2)

verbose

logical (default FALSE) to report progress of the computation

nThreads

number (default the number of all cores, including logical cores) to use for computation

Details

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:

Value

modeLambda returns a vector with the values of the mode of the density function (column probLambda) for each cell.

See Also

dlambda for the function to maximize.

Examples

 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)))

MobilePhoneESSnetBigData/pestim documentation built on May 31, 2019, 2:44 p.m.