evsi | R Documentation |
Calculate the expected value of sample information from a decision-analytic model
evsi(
outputs,
inputs,
study = NULL,
datagen_fn = NULL,
pars = NULL,
pars_datagen = NULL,
n = 100,
aux_pars = NULL,
method = NULL,
likelihood = NULL,
analysis_fn = NULL,
analysis_args = NULL,
model_fn = NULL,
par_fn = NULL,
Q = 50,
npreg_method = "gam",
nsim = NULL,
verbose = FALSE,
check = FALSE,
...
)
outputs |
This could take one of two forms "net benefit" form: a matrix or data frame of samples from the uncertainty distribution of the expected net benefit. The number of rows should equal the number of samples, and the number of columns should equal the number of decision options. "cost-effectiveness analysis" form: a list with the following named components:
Objects of class Users of heemod can create an object of this form, given an object
produced by If |
inputs |
Matrix or data frame of samples from the uncertainty
distribution of the input parameters of the decision model. The number
of columns should equal the number of parameters, and the columns should
be named. This should have the same number of rows as there are samples
in Users of heemod can create an object of this form, given an object
produced by |
study |
Name of one of the built-in study types supported by this
package for EVSI calculation. If this is supplied, then the columns of
Current built-in studies are
Either For the EVSI calculation methods where explicit Bayesian analyses of the
simulated data are performed, the prior parameters for these built-in studies
are supplied in the |
datagen_fn |
If the proposed study is not one of the built-in types supported, it can be specified in this argument as an R function to sample predicted data from the study. This function should have the following specification:
|
pars |
Character vector identifying which parameters are learned from the proposed study.
This is required for the moment matching and importance sampling methods,
and these should be columns of |
pars_datagen |
Character vector identifying which columns of If |
n |
Sample size of future study, or vector of alternative sample sizes.
This is understood by the built-in study designs. For studies specified
by the user with Currently this
shortcut is not supported if more than one quantity is required to
describe the sample size, for example, trials with unbalanced arms. In
that case, you will have to hard-code the required sample sizes into
For the nonparametric regression and importance sampling methods, the computation is simply repeated for each sample size supplied here. The moment matching method uses a regression model to estimate the dependency of the EVSI on the sample size, hence to enable EVSI to be calculated efficiently for any number of sample sizes (Heath et al. 2019). |
aux_pars |
A list of additional fixed arguments to supply to the
function to generate the data, whether that is a built-in study design or user-defined
function supplied in |
method |
Character string indicating the calculation method. Defaults to All the nonparametric regression methods supported for
Note that the |
likelihood |
Likelihood function, required (and only required) for the importance sampling method when a study design other than one of the built-in ones is used. This should have two arguments, named as follows:
The function should return a vector whose length matches the number of rows of the parameters data frame given as the second argument. Each element of the vector gives the likelihood of the corresponding set of parameters, given the data in the first argument. An example is given in the vignette. The likelihood can optionally have a Note the definition of the likelihood should agree with the definition of
|
analysis_fn |
Function which fits a Bayesian model to the generated
data. Required for
The function should return a data frame with names matching
|
analysis_args |
List of arguments required for the Bayesian analysis of
the predicted data, e.g. definitions of the prior and options to control
sampling. Only used in For the built-in designs, the lists should have the following named
components. An optional component
|
model_fn |
Function which evaluates the decision-analytic model, given
parameter values. Required for |
par_fn |
Function to simulate values from the uncertainty distributions
of parameters needed by the decision-analytic model. Should take one
argument and return a data frame with one row for each simulated value,
and one column for each parameter. See |
Q |
Number of quantiles to use in |
npreg_method |
Method to use to calculate the EVPPI, for those methods
that require it. This is passed to |
nsim |
Number of simulations from the model to use for calculating
EVPPI. The first |
verbose |
If |
check |
If |
... |
Other arguments understood by specific methods, e.g. |
See the package overview / Get Started vignette for some examples of using this function.
A data frame with a column pars
, indicating the
parameter(s), and a column evsi
, giving the corresponding
EVPPI. If the EVSI for multiple sample sizes was requested,
then the sample size is returned in the column n
, and if
outputs
is of "cost-effectiveness analysis" form, so that
there is one EVPPI per willingness-to-pay value, then a column
k
identifies the willingness-to-pay.
Heath, A., Kunst, N., & Jackson, C. (eds.). (2024). Value of Information for Healthcare Decision-Making. CRC Press.
Strong, M., Oakley, J. E., Brennan, A., & Breeze, P. (2015). Estimating the expected value of sample information using the probabilistic sensitivity analysis sample: a fast, nonparametric regression-based method. Medical Decision Making, 35(5), 570-583.
Menzies, N. A. (2016). An efficient estimator for the expected value of sample information. Medical Decision Making, 36(3), 308-320.
Heath, A., Manolopoulou, I., & Baio, G. (2018). Efficient Monte Carlo estimation of the expected value of sample information using moment matching. Medical Decision Making, 38(2), 163-173.
Heath, A., Manolopoulou, I., & Baio, G. (2019). Estimating the expected value of sample information across different sample sizes using moment matching and nonlinear regression. Medical Decision Making, 39(4), 347-359.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.