transform_postLoc: Transform a location probability matrix into a key-value...

Description Usage Arguments Value

View source: R/transform_postLoc.R

Description

This function transforms the matrix output for posterior location probabilities for each time instant (tiles $\times$ times) into a key-value pair data.table with key = c(device, time, tile).

The function does also this transformation upon the matrix of joint posterior location probabilities.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
transform_postLoc(
  postLocP,
  postLocJointP = NULL,
  observedValues,
  times,
  t_increment,
  ntiles,
  pad_coef = 1,
  tileEquiv.dt,
  devID,
  sparse_postLocP = FALSE,
  sparse_postLocJointP = FALSE
)

Arguments

postLocP

matrix with dimensions tiles $\times$ times with the posterior location probabilities.

observedValues

Vector with the observed values of the event variables.

times

vector of time instants.

t_increment

value with the increment of time between events.

ntiles

total number of tiles.

pad_coef

Integer coefficient denoting the number of time periods needed for the time padding.

tileEquiv.dt

data.table with the equivalence between tiles and raster cells according to the network event data simulator and rasters in R.

devID

device ID.

postLocJointProb

postLocP matrix of dimensions tiles $\times$ tiles * (times - 1) with the posterior joint location probabilities.

Value

A named list with components postLocProb_HMM_deviceID.dt and postLocJointProb with the key-value pair data.tables with these probabilities.


MobilePhoneESSnetBigData/destim documentation built on Dec. 7, 2020, 7:35 p.m.