postN0: Posterior mean, median, and mode for the number of...

Description Usage Arguments Details Value See Also Examples

Description

Compute the posterior mean, median, and mode for the number of individuals generating posterior distribution according to the hierarchical model at the initial time instant

Usage

1
2
3
postN0(nMNO, nReg, fu, fv, flambda, n = 1000, scale = 1, relTol = 1e-08,
  nSim = 1000, nStrata = c(1, 100), verbose = FALSE,
  nThreads = RcppParallel::defaultNumThreads(), alpha = 0.05)

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

n

number of points to generate in the posterior distribution for the computation. Default value is 1e3

scale

numeric vector with the scale to count the number of individuals. Default value is 1

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

alpha

the significance level for accuracy measures. Default value is 0.05

Details

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 of components must be named according to the name of the parameters of the random generator of the corresponding distribution according to:

Value

postN0 computes the posterior mean, median, and mode of the posterior distribution for each cell. The function returns a matrix with the estimates in columns and the cells in rows.

See Also

rN0

Examples

1
2
3
4
# It takes a couple of minutes
postN0(nMNO = 20, nReg = 115, fu = list('unif', xMin = 0.3, xMax = 0.5),
        fv = list('unif', xMin = 100, xMax = 120),
        flambda = list('gamma', shape = 11, scale = 12))

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