rNnetEvent: Generates random values according to a Poisson multinomial...

Description Usage Arguments Value

View source: R/rNnetEvent.R

Description

Generates random values according to a Poisson multinomial probability distribution. A point estimation derived from this distribution (mean, mode) represents an estimation of the number of individuals detected by the network in a region. Regions are composed as a number of adjacent tiles. This is the only one function of this package available to users to compute an estimation of the number of detected individuals. 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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
rNnetEvent(
  n,
  gridFileName,
  dupFileName,
  regsFileName,
  postLocPath,
  prefix,
  times,
  seed = 123
)

Arguments

n

The number of random values to be generated.

gridFileName

The name of the .csv file with the grid parameters.

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.

postLocPath

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.

times

A vector with the time instants when the events were registered.

seed

The value of the random seed to be used by the random number generator.

Value

A data.table object with the following columns: time, region, N, iter. The last column contains the index of the random value (given in column N) generated for each time instant and region.


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