DPModel_impl.Rd 4.51 KB
Newer Older
Poppy Miller's avatar
Poppy Miller committed
1
2
3
4
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model.R
\name{DPModel_impl}
\alias{DPModel_impl}
5
6
\title{Builds the source attribution model. Is not intended to be used by a regular user.
Developers only here!}
7
8
\format{
\code{\link{R6Class}} object.
Poppy Miller's avatar
Poppy Miller committed
9
}
10
11
12
13
\value{
Object of \code{\link{R6Class}}.
}
\description{
14
15
16
Builds the source attribution model. Is not intended to be used by a regular user.
Developers only here!

17
18
19
Builds the source attribution model. Is not intended to be used by a regular user.
Developers only here!
}
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
\section{Public fields}{
\if{html}{\out{<div class="r6-fields">}}
\describe{
\item{\code{y}}{3D array of [type, time, location] of the number of human cases}

\item{\code{X}}{3D array of the number of positive samples for each type, source and time
[type, source, time]}

\item{\code{R}}{3D array of normalised relative prevalences for each timepoint
[type, source, time]}

\item{\code{Time}}{a character vector of timepoint ids matching time dimension in y and R}

\item{\code{Location}}{a character vector of location ids matching location dimension in y}

\item{\code{Sources}}{a character vector of source ids matching the source dimension in X}

\item{\code{Type}}{a character vector of type ids matching the type dimension in X}

\item{\code{prev}}{a 2D array (matrix) of [source, time].}

\item{\code{a_q}}{concentration parameter for the DP}

\item{\code{a_theta}}{shape parameter for the Gamma base distribution for the DP}

\item{\code{b_theta}}{rate parameter for the Gamma base distribution for the DP}

\item{\code{a_r}}{3D array of [type, src, time] for the hyperprior on the relative prevalences R}

\item{\code{a_alpha}}{3D array of [source, time, location] for the prior on the alpha parameters}

\item{\code{s}}{vector giving initial group allocation for each type for the DP}
Poppy Miller's avatar
Poppy Miller committed
52

53
54
55
56
57
58
59
60
61
\item{\code{theta}}{vector giving initial values for each group in the DP}

\item{\code{alpha}}{3D array of [source, time, location] giving initial values for the alpha
parameters}
}
\if{html}{\out{</div>}}
}
\section{Active bindings}{
\if{html}{\out{<div class="r6-active-bindings">}}
62
63
\describe{
\item{\code{y}}{3D array of [type, time, location] of the number of human cases}
Poppy Miller's avatar
Poppy Miller committed
64

65
66
\item{\code{X}}{3D array of the number of positive samples for each type, source and time
[type, source, time]}
Poppy Miller's avatar
Poppy Miller committed
67

68
69
\item{\code{R}}{3D array of normalised relative prevalences for each timepoint
[type, source, time]}
Poppy Miller's avatar
Poppy Miller committed
70

71
\item{\code{Time}}{a character vector of timepoint ids matching time dimension in y and R}
Poppy Miller's avatar
Poppy Miller committed
72

73
\item{\code{Location}}{a character vector of location ids matching location dimension in y}
Poppy Miller's avatar
Poppy Miller committed
74

75
\item{\code{Sources}}{a character vector of source ids matching the source dimension in X}
Poppy Miller's avatar
Poppy Miller committed
76

77
\item{\code{Type}}{a character vector of type ids matching the type dimension in X}
Poppy Miller's avatar
Poppy Miller committed
78

79
\item{\code{prev}}{a 2D array (matrix) of [source, time].}
Poppy Miller's avatar
Poppy Miller committed
80

81
\item{\code{a_q}}{concentration parameter for the DP}
Poppy Miller's avatar
Poppy Miller committed
82

83
84
85
86
87
88
89
90
91
92
93
94
95
96
\item{\code{a_theta}}{shape parameter for the Gamma base distribution for the DP}

\item{\code{b_theta}}{rate parameter for the Gamma base distribution for the DP}

\item{\code{a_r}}{3D array of [type, src, time] for the hyperprior on the relative prevalences R}

\item{\code{a_alpha}}{3D array of [source, time, location] for the prior on the alpha parameters}

\item{\code{s}}{vector giving initial group allocation for each type for the DP}

\item{\code{theta}}{vector giving initial values for each group in the DP}

\item{\code{alpha}}{3D array of [source, time, location] giving initial values for the alpha
parameters}
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
}
\if{html}{\out{</div>}}
}
\section{Methods}{
\subsection{Public methods}{
\itemize{
\item \href{#method-new}{\code{DPModel_impl$new()}}
\item \href{#method-clone}{\code{DPModel_impl$clone()}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-new"></a>}}
\if{latex}{\out{\hypertarget{method-new}{}}}
\subsection{Method \code{new()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{DPModel_impl$new(
  y,
  X,
  R,
  Time,
  Location,
  Sources,
  Type,
  prev,
  a_q,
  a_theta,
  b_theta,
  a_r,
  a_alpha,
  s,
  theta,
  alpha
)}\if{html}{\out{</div>}}
}
131

132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-clone"></a>}}
\if{latex}{\out{\hypertarget{method-clone}{}}}
\subsection{Method \code{clone()}}{
The objects of this class are cloneable with this method.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{DPModel_impl$clone(deep = FALSE)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{deep}}{Whether to make a deep clone.}
}
\if{html}{\out{</div>}}
}
}
}