value of information calculations in r
TRANSCRIPT
Value of information calculations in R
Howard Thom with
Wei Fang, Zhenru Wang, Mike Giles, Chris Jackson, Mike Giles,
Christoph Andrieu and Nicky Welton
UCL, 11th July 2018
School of Social and Community Medicine
Overviewโข Recall the formula for the expected value of partial perfect information (EVPPI)
๐ธ๐๐๐๐ผ ๐ = ๐ธ๐ max๐โ๐ท๐ธ๐|๐ ๐๐ต๐ ๐, ๐ โ max
๐โ๐ท๐ธ๐,๐ ๐๐ต๐ ๐, ๐
โข EVPPI can be estimated (in principle) by nested Monte Carlo simulation:
1
๐
๐=1
๐
max๐โ๐ท
1
๐
๐=1
๐
๐๐ต๐ ๐(๐), ๐(๐,๐) โmax
๐โ๐ท
1
๐๐
๐=1
๐
๐=1
๐
๐๐ต๐ ๐(๐), ๐(๐,๐)
โข This requires ๐ samples of ๐(๐) and M samples ๐(๐,๐) conditional on each ๐(๐)
โข This nested simulation is biased due to Jensenโs inequality and computationally intensive.
โข Near impossible to estimate using Excel; possible in R but may struggle for complex models
โข R can parallelise computation to increase efficiency: run each sample from ๐(๐) on separate CPU.โข Package โparallelโ in R.
โข Can also use meta-modelling techniques, some of which have been implemented in easy-to-use R
packages or online servies.
โข We propose using efficient Monte Carlo sampling schemes for efficient and accurate estimation
Meta-modelling approaches
โข Consider the first term of the EVPPI
๐ธ๐๐๐๐ผ ๐ = ๐ธ๐ max๐โ๐ท๐ธ๐|๐ ๐๐ต๐ ๐, ๐ โ max
๐โ๐ท๐ธ๐,๐ ๐๐ต๐ ๐, ๐
โข We can remove the nested simulation by regressing ๐๐ต๐ ๐, ๐ on ๐๐๐ต๐ ๐, ๐ = ๐ธ๐|๐ ๐๐ต๐ ๐, ๐ + ํ
๐๐ต๐ ๐, ๐ = ๐๐(๐) + ํ
โข Where ๐๐(๐) is some unknown smooth function and ๐ธ ํ = 0
โข The fitted values ๐๐ ๐ are estimates of ๐ธ๐|๐ ๐๐ต๐ ๐, ๐
โข EVPPI now requires only a single loop
๐ธ๐๐๐๐ผ ๐ โ1
๐พ
๐=1
๐พ
max๐ ๐๐ ๐(๐) โmax
๐
1
๐พ
๐=1
๐พ
๐๐ ๐(๐)
โข Need to choose a ๐๐() that represents well how ๐๐ต๐ depends on ๐, ๐, ๐๐ต๐โข Estimating ๐๐() itself may be computationally challenging
Generalised additive modelโข The generalised additive model (GAM) is commonly used to estimate EVPPI for sets of up to
5 parameters.
โข Assuming ๐ (๐) is a smooth function, the GAM is
๐๐ต๐๐= ๐ ๐ ๐ + ํ(๐)
โข Where the function ๐ (๐) is a sum of known โbasisโ functions
๐ ๐ =
๐=1
๐
๐พ๐๐๐(๐)
โข The ๐พ๐ are parameters estimated from the samples of ๐๐ต๐ and ๐.
โข In higher dimensions would need to specify a multivariate smooth function
๐๐ต๐ = ๐ ๐1, โฆ , ๐๐ + ํ
โข Would need ๐๐ basis functions where ๐ is number of basis functions needed for each
dimension.
โข Computationally infeasible if number of independent variables greater than 5 or 6
โข GAM are implemented in the BCEA for R package and the SAVI website.
Gaussian process regressionโข A further option implemented in BCEA and SAVI is Gaussian process (GP) regression
โข The regression model is
๐๐ต๐ = ๐๐(๐ฟ๐) + ํ
with ํ~๐(0, ๐2)
โข The ๐ฟ๐ are the set of ๐ focal parameters
โข Now the function ๐๐(๐ฟ๐) is a GP which is equivalent to
๐๐ต(๐)~๐๐๐๐๐๐(๐ฏ๐ฝ, ๐2๐ฎ(๐ฟ) + ฮฝ๐ฐ)
โข Where
๐ฏ =
1 ๐1(1)
1 ๐1(2)
โฏ ๐๐(1)
โฏ ๐๐(2)
โฎ โฎ
1 ๐1(๐)โฑ โฎ
โฏ ๐๐(๐)
โข Hyperparameters are pre-specified by the SAVI software, which may adversely affect its performance.
โข R code available that can better estimate the hyperparameters and conduct GP regression.
โข GP involves inverting an ๐ ร ๐ matrix at ๐(๐3) computational cost.
โข The dimension of the focal parameters ๐ฟ๐ also influences the cost.
SPDE-INLAโข The BCEA package includes a highly efficient adaptation of the GP regression method.
โข Adapts ideas from spatial statistics for approximation of high dimensional with low dimensional
problems
โข Approximates high dimensional GP with low dimensional GP that is solution to a form of SPDE.
โข This changes task from inverting dense ๐ ร๐ matrix at ๐(๐3) cost to inverting sparse ๐ ร๐ matrix at ๐(๐ 32) cost
โข SPDE is latent Gaussian model, efficiently solved by integrated nested Laplace approximation (INLA)โข BCEA uses the โR-INLAโ package in R.
โข SPDE approach doesnโt work in high dimensional parameter space.
โข BCEA therefore uses principal fitted components projection to reduce to 2-dimensions.โข BCEA uses the โldrโ package in R.
โข Syntax in R is relatively simple:
evppi.inla<-evppi(param.indices,all.param.samples,bcea.model.object,method="INLA")
Multilevel Monte-Carloโข Key idea is to choose an estimator ๐ธ๐๐๐๐ผ0 with a larger bias but much lower cost than ๐ธ๐๐๐๐ผ.
โข We can then construct the EVPPI estimator
1
๐0
๐=1
๐0
๐ธ๐๐๐๐ผ0(๐)+1
๐1
๐=1
๐1
๐ธ๐๐๐๐ผ(๐) โ ๐ธ๐๐๐๐ผ0(๐)
โข We then need only estimate the (cheap) ๐ธ๐๐๐๐ผ0 and the difference ๐ธ๐๐๐๐ผ โ ๐ธ๐๐๐๐ผ0.
โข So long as ๐ธ๐๐๐๐ผ and ๐ธ๐๐๐๐ผ0 are highly correlated the variance will be small and number of samples
๐1 for accurate estimation will be small.
โข The variance of ๐ธ๐๐๐๐ผ0 is close to that of ๐ธ๐๐๐๐ผ so ๐0 is similar to number needed to estimate ๐ธ๐๐๐๐ผ
โข This extends naturally via a sequence of estimators ๐ธ๐๐๐๐ผ0, ๐ธ๐๐๐๐ผ1, โฆ, ๐ธ๐๐๐๐ผ๐ฟ to the estimator
1
๐0
๐=1
๐0
๐ธ๐๐๐๐ผ0(0,๐)+
๐=1
๐ฟ1
๐๐ ๐ธ๐๐๐๐ผ(๐,๐) โ ๐ธ๐๐๐๐ผ0
(๐,๐)
MLMC for EVPPIโข In practice it is more efficient o estimate the quantity
๐ท๐ผ๐น๐น = ๐ธ๐๐๐ผ โ ๐ธ๐๐๐๐ผ
โข The MLMC estimator using ๐๐ outer samples for each level ๐ is then
๐ท๐ผ๐น๐น =
๐=1
๐ฟ1
๐๐
๐=1
๐๐
๐ท๐ผ๐น๐น๐(๐,๐)โ ๐ท๐ผ๐น๐น๐โ1
(๐,๐)
โข Unlike NMC, MLMC provides an estimate of the estimation bias
๐ธ ๐ท๐ผ๐น๐น๐ฟ+1 โ ๐ท๐ผ๐น๐น๐ฟ ~
๐=๐ฟ+1
โ
๐ธ ๐ท๐ผ๐น๐น๐ โ ๐ท๐ผ๐น๐น๐โ1 = ๐ท๐ผ๐น๐น โ ๐ธ ๐ท๐ผ๐น๐น๐ฟ
โข Number of levels ๐ฟ is chosen to achieve bias โค 0.5ํ and ๐๐ chosen to achieve variance โค 0.75ํ2.
โข This achieves Mean Square Error (MSE) ํ2 at a cost which is only ๐ ํโ2
โข Nested Monte-Carlo would require ๐ ํโ3
โข Package โmlmcโ exits in R and forthcoming publication will include example code.
Quasi Monte Carlo
โข Assuming ๐ is a real-valued function and ๐ is a random variable with cumulative distribution ๐น, we
estimate ๐ธ ๐(๐) by
1
๐
๐=1
๐
๐ ๐๐
where ๐๐ = ๐นโ1 ๐๐ and ๐๐ are uniformly distributed in 0,1 .
โข Standard MC chooses ๐๐ for ๐๐ randomly.
โข QMC chooses ๐๐ for ๐๐ systematically.
โข QMC is deterministic and achieves a better convergence rate of the error than MC
โข For EVPPI, only apply QMC to outer samples N as not many inner samples ๐ are needed for
accuracy.
โข A confidence interval for estimated EVPPI can be provided using randomized QMC.
โข Randomized QMC is unbiased and has much lower variance than NMC.
Quasi Monte Carlo
โข Example of QMC uniform random number generation in 2-dimensions for 256 points using using rank-1
lattice points or a Sobol sequence.
Depression toy example
โข Artificial example comparing no-treatment with CBT and antidepressants.
โข Decision tree model follows structure used in NICE CG90 guidelines
โข Analysed network meta-analysis data using Markov Chain Monte Carlo (MCMC)
Depression toy example - results
โข MC, MLMC, and QMC based on 50,000 samples; GAM, GP, and INLA on 7500 to account for
additional computation time for regression.
โข MLMC did not offer reliable computational savings over MC.
โข QMC offered substantial computational savings on larger EVPPI values.
โข GAM and INLA perform well on small EVPPI values.
ParametersMC reference
(RMSE)MC QMC MLMC GAM (SE) GP (SE) INLA
Probabilities
(6)275.71 (0.5) 273.62 (5.19) 290.20 (3.03) 274.84 (12.00) NA 332.84 (44.43) 293.44
Costs and
QALYs (6)287.29 (0.5) 286.86 (5.46) 286.93 (4.58) 285.13 (9.80) NA 281.50 (29.92) 547.42
CBT lor (2) 7.35 (0.5) 29.53 (20.47) 44.65 (20.44) 22.03 (19.44) 11.01 (6.46) NA 13.83
Antidepressan
t lor (2)1.78 (0.25) .28 (18.73) 5.12 (16.58) 4.10 (16.00) 2.26 (6.51) NA 4.81
Diagnostic plots from INLA
โข INLA gave unreliable estimates for the cost and utilities parameter set, but diagnostic plots alert us.
โข These are generated using
diag.evppi(x=evppi.inla.lor.anti,y=he.depression)
diag.evppi(x=evppi.inla.lor.anti,y=he.depression,diag="qqplot")
โข Not clear what the problem is: the model structure is a simple decision tree and these (log) cost and
utilities parameters follow independent normal distributions.
DOACs for atrial fibrillation
โข 17 health states plus two
transient events (TIA and
SE)
โข 5 treatment options:
coumarin, apixaban,
dabigatran, rivaroxaban,
edoxaban.
โข Competing risks NMA fit
using MCMC (35-dim)
โข Baseline hazards (7-dim)
and hazard ratios relative to
no treatment (7-dim) also
used MCMC
โข Impact of previous events on
future risks, cost and utility
parameters bring total to 99.
AF Well
MI
Stroke
Major Bleed
ICH
B+S
ICH+S
MI+S
B+MI
B+MI+S
B+ICH+S S+B
+MI+ICH De
ad
ICH+MI
B+ICH+MI
ICH+MI+S
B+ICH
DOACs model results
โข MC, MLMC, and QMC cost are 105 samples.
โข INLA and GP based on only 7500 samples (max accepted by SAVI)
โข GAM cannot be used as parameter sets too large.
โข INLA and GP did not give accurate results with small number of simulations.
โข Only (parallel computationally intensive) nested MC, MLMC and QMC provided reliable resultsโฆ
Parameters
(N)
Reference
value (RMSE)MC cost MLMC cost QMC cost GP (SE) INLA
Simple trial
(14)196.69 (1.23) 2144 68.63 - 561.26 (68.22) 741.09
Complex trial
(79)273.33 (1.23) 157 33.78 89.54 869.79 (69.87) -
All MCMC
(41)348.23 (1.23) 139.9 24.47 31.72 782.38 (73.95) 256.56
Loghr MCMC
(28)286.48 (1.23) 317.1 31.85 21.21 978.03 (94.67) 551.98
Conclusions
โข Wealth of options for estimating EVPPI in R
โข For simple models (decision trees, low-state Markov) and low dimensional
parameter sets, SAVI and BCEA can be efficient and reliable.
โข In more complex situations, necessary to use parallel computing Monte Carlo
or advanced sampling schemes.
โข However, these are more challenging to implement and there are no black-
box functions similar to BCEA or SAVI.
โข Parallel computing and efficient sampling schemes are near impossible to
implement in Excel.
Acknowledgementsโข Hubs for Trials Methodology Research (HTMR), Network Grant N79, Efficient sample schemes for
estimation of value of information of future research.
โข The HTMR Collaboration and innovation in Difficult and Complex randomised controlled Trials In
Invasive procedures (ConDuCT-II) hub provided support for this research.
โข Funding for the DOACs model was provided by NIHR HTA grant 11/92/17
โข This study was supported by the NIHR Biomedical Research Centre at the University Hospitals Bristol
NHS Foundation Trust and the University of Bristol. The views expressed in this presentation are those
of the author(s) and not necessarily those of the NHS, the National Institute for Health Research or
the Department of Health.
MLMC for EVPPI
โข To apply MLMC to EVPPI we instead estimate the quantity
๐ท๐ผ๐น๐น = ๐ธ๐๐๐ผ โ ๐ธ๐๐๐๐ผ = ๐ธ๐,๐ max๐โ๐ท๐(๐, ๐) โ ๐ธ๐ max
๐โ๐ท๐ธ๐|๐ ๐๐ ๐, ๐
โข The NMC estimator with 2๐ inner samples based on ๐ ๐ is
๐ท๐ผ๐น๐น๐ =1
2๐
๐=1
2๐
max๐โ๐ท๐๐ ๐(๐), ๐(๐,๐) โmax
๐โ๐ท
1
2๐
๐=1
2๐
๐๐ ๐(๐), ๐(๐,๐)
โข MLMC generates a sequence of differences ๐ท๐ผ๐น๐น๐ โ ๐ท๐ผ๐น๐น๐โ1 and estimates the telescoping sum
๐ธ ๐ท๐ผ๐น๐น๐ฟ = ๐ธ ๐ท๐ผ๐น๐น0 +
๐=1
๐ฟ
๐ธ ๐ท๐ผ๐น๐น๐ โ ๐ท๐ผ๐น๐น๐โ1
โข For low ๐, ๐ท๐ผ๐น๐น๐ โ ๐ท๐ผ๐น๐น๐โ1 is cheap to evaluate, for high ๐ it has a low variance so few samples are
needed to estimate its expectation