enbs_opt {voi} | R Documentation |
Determine the optimum sample size in an analysis of the expected net benefit of sampling
Description
The optimum sample size for a given willingness to pay is determined either by a simple search over the supplied ENBS estimates for different sample sizes, or by a regression and interpolation method.
Usage
enbs_opt(x, pcut = 0.05, smooth = FALSE, smooth_df = NULL, keep_preds = FALSE)
Arguments
x |
Data frame containing a set of ENBS estimates for
different sample sizes, which will be optimised over. Usually
this is for a common willingness-to-pay. The required components
are |
pcut |
Cut-off probability which defines a "near-optimal" sample size.
The minimum and maximum sample size for which the ENBS is within
|
smooth |
If If this is |
smooth_df |
Basis dimension for the smooth regression. Passed as the
|
keep_preds |
If |
Value
A data frame with one row, and the following columns:
ind
: An integer index identifying, e.g. the willingness to pay and other common characteristics of the ENBS estimates (e.g. incident population size, decision time horizon). This is copied from x$ind
.
enbsmax
: the maximum ENBS
nmax
: the sample size at which this maximum is achieved
nlower
: the lowest sample size for which the ENBS is within
pcut
(default 5%) of its maximum value
nupper
: the corresponding highest ENBS