- data
A data.frame
with one row for each pooled sampled and
columns for the size of the pool (i.e. the number of specimens / isolates /
insects pooled to make that particular pool), the result of the test of the
pool. It may also contain additional columns with additional information
(e.g. location where pool was taken) which can optionally be used for
stratifying the data into smaller groups and calculating prevalence by
group (e.g. calculating prevalence for each location)
- result
The name of column with the result of each test on each pooled
sample. The result must be stored with 1 indicating a positive test result
and 0 indicating a negative test result.
- poolSize
The name of the column with number of
specimens/isolates/insects in each pool
- ...
Optional name(s) of columns with variables to stratify the data
by. If omitted the complete dataset is used to estimate a single
prevalence. If included, prevalence is estimated separately for each group
defined by these columns
- bayesian
Logical indicating whether Bayesian calculations should be
calculated. If TRUE (the default) calculates frequentist and Bayesian
estimates of prevalence, otherwise only calculates frequentist estimates
(MLE and likelihood ratio confidence intervals).
- prior
Prior for prevalence, ignored if bayesian == FALSE
. If
NULL (the default) the prior for the prevalence is the uninformative
Jeffrey's prior. The only alternative prior is a possibly zero-inflated
beta distribution. Zero inflation allows for some prior (and posterior)
probability that the marker of interest is totally absent from the
population. The parameters for this are specified with a list with three
numeric non-negative entries named alpha, beta, and absent. For instance, a
uniform prior with no probability of true absence can be specified as
prior = list(alpha = 1, beta = 1, absent = 0
.
- robust
Logical. If TRUE
(default), the point estimate of
prevalence is the posterior median. If FALSE
, the posterior mean is
used instead. Applies to Bayesian estimates only and therefore ignored if
bayesian = FALSE
.
- level
Defines the confidence level to be used for the confidence and
credible intervals. Defaults to 0.95 (i.e. 95% intervals)
- all.negative.pools
The kind of point estimate and interval to use when
all pools are negative (Bayesian estimates only). If 'zero'
(default), uses 0 as the point estimate and lower bound for the interval
and level
posterior quantile the upper bound of the interval. If
'consistent'
, result is the same as for the case where at least one
pool is positive. Applies to Bayesian estimates only and therefore ignored
if bayesian == FALSE
.
- reproduce.poolscreen
(defaults to FALSE). If TRUE this changes the way
that likelihood ratio confidence intervals are computed to be somewhat
wider and more closely match those returned by Poolscreen. We recommend
using the default (FALSE). However setting to TRUE can help to make
comparisons between PoolPrev and Poolscreen.
- verbose
Logical indicating whether to print progress to screen.
Defaults to false (no printing to screen). Ignored if bayesian ==
FALSE
.
- cores
The number of CPU cores to be used. By default one core is used.
Ignored if bayesian == FALSE
.
- iter, warmup, chains
MCMC options for passing onto the sampling routine.
See stan for details. Ignored if bayesian == FALSE
.
- control
A named list of parameters to control the sampler's behaviour.
Defaults to default values as defined in stan, except for
adapt_delta
which is set to the more conservative value of 0.98. See
stan for details. Ignored if bayesian == FALSE
.