rNnetEventOD: Generates random value according to a Poisson multinomial...

Description Usage Arguments Value

View source: R/rNnetEventOD.R

Description

Generates random value according to a Poisson multinomial distribution needed to estimate the origin destination matrices. This is a high level function, the only one to be called by users to estimate the number of individuals going from one region to another. For a theoretical background an interested reader can find more details in the methodological framework available here: https://webgate.ec.europa.eu/fpfis/mwikis/essnetbigdata/images/f/fb/WPI_Deliverable_I3_A_proposed_production_framework_with_mobile_network_data_2020_05_31_draft.pdf The actual omputations are performed using a parallelization (transparent to the users) which uses the whole number of (logical) cores.

Usage

1
2
3
4
5
6
7
8
rNnetEventOD(
  n,
  dupFileName,
  regsFileName,
  postLocJointPath,
  prefix,
  seed = 123
)

Arguments

n

The number of random values to be generated.

dupFileName

The name of the .csv file with the duplicity probability for each device. This is an output of the deduplication package.

regsFileName

The name of the .csv file defining the regions. It has two columns: tile, region. The first column contains the IDs of each tile in the grid while the second contains the number of a region. This file is defined by the user and it can be created with any text editor.

postLocJointPath

The path where the files with the posterior location probabilities for each device can be found. A file with the location probabilities should have the name prefix_ID.csv where ID is replaced with the device ID and prefix is given as a parameter to this function.

prefix

A prefix that is used to compose the file name with posterior location probabilities.

Value

A data table object with the following columns: time_from, time_to, region_from, region_to, Nnet, iter. The number of detected individuals moving from a region to another between two succesive time instants is given in column Nnet while the last column gives the index of the random value generated for this number.


bogdanoancea/aggregation documentation built on Nov. 29, 2020, 5:09 p.m.