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

Description Usage Arguments Value Examples

Description

Compute the posterior mean, median, and mode for the number of individuals generating posterior distribution according to the hierarchical model conditioned upon the initial population of each cell, which must be provided

Usage

1
postNtcondN0(N0, nMNOmat, distNames, variation, n = 1000, alpha = 0.05)

Arguments

N0

initial population in each cell

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

n

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

alpha

the significance level for accuracy measures. Default value is 0.05

Value

Return a matrix with three columns (mean, median, and mode estimates) and one row per cell

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## First, the inputs:

# The initial population
N0 <- c(93, 123, 130)

#The transition matrix of individuals detected by the MNO
nMNOmat <- rbind(c(10, 3, 4), c(5, 21, 3), c(3, 9, 18))

# Names and parameters of priors for the transition probabilities
distNames <- rep('unif', 3)
variation <- rep(list(list(cv = 0.20)), 3)

# It takes a couple of minutes.
postNtcondN0(N0, nMNOmat, distNames, variation)

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