Learn R Programming

sourceR (version 1.0.1)

DPModel_impl: Builds the source attribution model. Is not intended to be used by a regular user.

Description

Builds the source attribution model. Is not intended to be used by a regular user. Developers only here!

Usage

DPModel_impl

Arguments

Value

Object of R6Class.

Format

R6Class object.

Fields

y
3D array of [type, time, location] of the number of human cases

X
3D array of the number of positive samples for each type, source and time [type, source, time]

R
3D array of normalised relative prevalences for each timepoint [type, source, time]

Time
a character vector of timepoint ids matching time dimension in y and R

Location
a character vector of location ids matching location dimension in y

Sources
a character vector of source ids matching the source dimension in X

Type
a character vector of type ids matching the type dimension in X

prev
a 2D array (matrix) of [source, time].

a_q
concentration parameter for the DP

a_theta
shape parameter for the Gamma base distribution for the DP

b_theta
rate parameter for the Gamma base distribution for the DP

a_r
3D array of [type, src, time] for the hyperprior on the relative prevalences R

a_alpha
3D array of [source, time, location] for the prior on the alpha parameters

s
vector giving initial group allocation for each type for the DP

theta
vector giving initial values for each group in the DP

alpha
3D array of [source, time, location] giving initial values for the alpha parameters