DPModel_impl.Rd 4.51 KB
 Poppy Miller committed Dec 22, 2016 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}  Poppy Miller committed Jan 02, 2017 5 6 \title{Builds the source attribution model. Is not intended to be used by a regular user. Developers only here!}  Chris Jewell committed Apr 24, 2020 7 8 \format{ \code{\link{R6Class}} object.  Poppy Miller committed Dec 22, 2016 9 }  Poppy Miller committed Jan 02, 2017 10 11 12 13 \value{ Object of \code{\link{R6Class}}. } \description{  Chris Jewell committed Apr 24, 2020 14 15 16 Builds the source attribution model. Is not intended to be used by a regular user. Developers only here!  Poppy Miller committed Jan 02, 2017 17 18 19 Builds the source attribution model. Is not intended to be used by a regular user. Developers only here! }  Chris Jewell committed Apr 24, 2020 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{
}} \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 committed Dec 22, 2016 52   Chris Jewell committed Apr 24, 2020 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{
}}  Poppy Miller committed Jan 02, 2017 62 63 \describe{ \item{\code{y}}{3D array of [type, time, location] of the number of human cases}  Poppy Miller committed Dec 22, 2016 64   Poppy Miller committed Jan 02, 2017 65 66 \item{\code{X}}{3D array of the number of positive samples for each type, source and time [type, source, time]}  Poppy Miller committed Dec 22, 2016 67   Poppy Miller committed Jan 02, 2017 68 69 \item{\code{R}}{3D array of normalised relative prevalences for each timepoint [type, source, time]}  Poppy Miller committed Dec 22, 2016 70   Poppy Miller committed Jan 02, 2017 71 \item{\code{Time}}{a character vector of timepoint ids matching time dimension in y and R}  Poppy Miller committed Dec 22, 2016 72   Poppy Miller committed Jan 02, 2017 73 \item{\code{Location}}{a character vector of location ids matching location dimension in y}  Poppy Miller committed Dec 22, 2016 74   Poppy Miller committed Jan 02, 2017 75 \item{\code{Sources}}{a character vector of source ids matching the source dimension in X}  Poppy Miller committed Dec 22, 2016 76   Poppy Miller committed Jan 02, 2017 77 \item{\code{Type}}{a character vector of type ids matching the type dimension in X}  Poppy Miller committed Dec 22, 2016 78   Poppy Miller committed Jan 02, 2017 79 \item{\code{prev}}{a 2D array (matrix) of [source, time].}  Poppy Miller committed Dec 22, 2016 80   Poppy Miller committed Jan 02, 2017 81 \item{\code{a_q}}{concentration parameter for the DP}  Poppy Miller committed Dec 22, 2016 82   Poppy Miller committed Jan 02, 2017 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}  Chris Jewell committed Apr 24, 2020 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{
}} } \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{
}}\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{ }} }  millerp committed May 03, 2017 131   Chris Jewell committed Apr 24, 2020 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 } \if{html}{\out{ }} \if{html}{\out{}} \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{ }}\preformatted{DPModel_impl$clone(deep = FALSE)}\if{html}{\out{
}} } } }