Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Decision Analytic Modelling In Health Economics

NotificationsYou must be signed in to change notification settings

ajsims1704/rdecision

Repository files navigation

CRAN statusCodecov test coverage

The goal ofrdecision is to provide methods for assessing health careinterventions using cohort models (decision trees and semi-Markov models) whichcan be constructed using only a few lines of R code. Mechanismsare provided for associating an uncertainty distribution with each sourcevariable and for ensuring transparency of the mathematical relationships betweenvariables. The package terminology follows Briggset al “Decision Modellingfor Health Economic Evaluation”1.

Installation

You can install the released version of rdecision fromCRAN with:

install.packages("rdecision")

Examples

A decision tree with parameter uncertainty

Consider the fictitious and idealized decision problem of choosing betweenproviding two forms of lifestyle advice, offered to people with vasculardisease, which reduce the risk of needing an interventional procedure. It isassumed that the interventional procedure is the insertion of a stent, thatthe current standard of care is the provision of dietary advice, and that thenew form of care is enrolment on an exercise programme. To assess the decisionproblem, we construct a model from the perspective of a healthcare provider,with a time horizon of one year, and assume that the utility of both formsof advice is equal. The model evaluates the incremental benefit of theexercise programme as the incremental number of interventional proceduresavoided against the incremental cost of the exercise programme.

The cost to a healthcare provider of the interventional procedure(e.g., inserting a stent) is 5000 GBP; the cost of providing the current form oflifestyle advice, an appointment with a dietician (“diet”), is 50 GBP and thecost of providing an alternative form, attendance at an exerciseprogramme (“exercise”), is 750 GBP. None of the costs are subject touncertainty, and are modelled as constant model variables.

cost_diet<-ConstModVar$new("Cost of diet programme","GBP",50.0)cost_exercise<-ConstModVar$new("Cost of exercise programme","GBP",750.0)cost_stent<-ConstModVar$new("Cost of stent intervention","GBP",5000.0)

If an advice programme is successful, there is no need for an interventionalprocedure. In a small trial of the “diet” programme, 12 out of 68 patients(17.6%) avoided having a procedure, and in a separate small trial of the“exercise” programme 18 out of 58 patients (31.0%) avoided the procedure. Itis assumed that the baseline characteristics in the two trials were comparable.The trial results are represented as scalar integers.

s_diet<-12Lf_diet<-56Ls_exercise<-18Lf_exercise<-40L

The proportions of the two programmes being successful (i.e., avoidingan interventional procedure) are uncertain due to the finite size of each trialand are represented by model variables with uncertainties which follow Betadistributions.

p_diet<-BetaModVar$new(alpha=s_diet,beta=f_diet,description="P(diet)",units="")p_exercise<-BetaModVar$new(alpha=s_exercise,beta=f_exercise,description="P(exercise)",units="")

The decision tree has one decision node, representing the single choice of thedecision problem (i.e., between the two advice programmes), two chance nodes,representing whether each programme is a success or failure, and four leafnodes (intervention or no intervention for each of the two programmes).

decision_node<-DecisionNode$new("Programme")
chance_node_diet<-ChanceNode$new("Outcome")chance_node_exercise<-ChanceNode$new("Outcome")
leaf_node_diet_no_stent<-LeafNode$new("No intervention")leaf_node_diet_stent<-LeafNode$new("Intervention")leaf_node_exercise_no_stent<-LeafNode$new("No intervention")leaf_node_exercise_stent<-LeafNode$new("Intervention")

There are two action edges emanating from the decision node, which represent thetwo choices, each with an associated cost.

action_diet<-Action$new(decision_node,chance_node_diet,cost=cost_diet,label="Diet")action_exercise<-Action$new(decision_node,chance_node_exercise,cost=cost_exercise,label="Exercise")

There are four reaction edges, representing the consequences of thesuccess and failure of each programme. Edges representing success are associatedwith the probability of programme success, and those representing programmefailure are assigned a probability ofNA (to ensure that the total probabilityassociated with each chance node is one) and a failure cost (of fitting astent).

reaction_diet_success<-Reaction$new(chance_node_diet,leaf_node_diet_no_stent,p=p_diet,cost=0.0,label="Success")reaction_diet_failure<-Reaction$new(chance_node_diet,leaf_node_diet_stent,p=NA_real_,cost=cost_stent,label="Failure")reaction_exercise_success<-Reaction$new(chance_node_exercise,leaf_node_exercise_no_stent,p=p_exercise,cost=0.0,label="Success")reaction_exercise_failure<-Reaction$new(chance_node_exercise,leaf_node_exercise_stent,p=NA_real_,cost=cost_stent,label="Failure")

The decision tree model is constructed from the nodes and edges.

dt<-DecisionTree$new(V=list(decision_node,chance_node_diet,chance_node_exercise,leaf_node_diet_no_stent,leaf_node_diet_stent,leaf_node_exercise_no_stent,leaf_node_exercise_stent  ),E=list(action_diet,action_exercise,reaction_diet_success,reaction_diet_failure,reaction_exercise_success,reaction_exercise_failure  ))

The methodevaluate is used to calculate the costs and utilities associatedwith the decision problem. By default, it evaluates it once with all the modelvariables set to their expected values and returns a data frame.

rs<-dt$evaluate()

Examination of the results of evaluation shows that the expected per-patient netcost of the diet advice programme is 4,168 GBP and the per-patient netcost of the exercise programme is 4,198 GBP; i.e., the net cost of theexercise programme exceeds the diet programme by 31 GBP perpatient. The savings associated with the greater efficacy of the exerciseprogramme do not offset the increased cost of delivering it.

Because the probabilities of the success proportions of the two treatments havebeen represented as model variables with an uncertainty distribution, theuncertainty of the relative effectiveness is estimated by repeated evaluationof the decision tree.

N<-1000Lrs<-dt$evaluate(setvars="random",by="run",N=N)

The confidence interval of the net cost difference (net cost of the dietprogramme minus the net cost of the exercise programme) is estimated fromthe resulting data frame. From 1000 runs, the mean net cost difference is-18.98 GBP with 95% confidence interval-775.04 GBPto 766.98 GBP,with 47% runs having a lowernet cost for the exercise programme. Although the point estimate net cost ofthe exercise programme exceeds that of the diet programme, due to theuncertainties of the effectiveness ofeach programme, it can be concluded that there is insufficient evidencethat the net costs differ.

The methodthreshold is used to find the threshold of one of the modelvariables at which the cost difference reaches zero. By univariatethreshold analysis, the exercise program will be cost saving when its cost ofdelivery is less than 719 GBP or when its success rate isgreater than 31.74%. These thresholds are alsosubject to uncertainty.

A three-state Markov model

Sonnenberg and Beck2 introduced an illustrative example of asemi-Markov process with three states: “Well”, “Disabled” and “Dead” and onetransition between each state, each with a per-cycle probability. Inrdecision such a model is constructed as follows. Note that transitionsfrom a state to itself must be specified if allowed, otherwise the state wouldbe a temporary state.

# create statess.well<-MarkovState$new(name="Well",utility=1.0)s.disabled<-MarkovState$new(name="Disabled",utility=0.7)s.dead<-MarkovState$new(name="Dead",utility=0.0)
# create transitions leaving rates undefinedE<-list(Transition$new(s.well,s.well),Transition$new(s.dead,s.dead),Transition$new(s.disabled,s.disabled),Transition$new(s.well,s.disabled),Transition$new(s.well,s.dead),Transition$new(s.disabled,s.dead))
# create the modelM<-SemiMarkovModel$new(V=list(s.well,s.disabled,s.dead),E)
# create transition probability matrixsnames<- c("Well","Disabled","Dead")Pt<-matrix(data= c(0.6,0.2,0.2,0.0,0.6,0.4,0.0,0.0,1.0),nrow=3L,byrow=TRUE,dimnames=list(source=snames,target=snames))# set the transition rates from per-cycle probabilitiesM$set_probabilities(Pt)

With a starting population of 10,000, the model can be run for 24 years asfollows.

# set the starting populationsM$reset(c(Well=10000.0,Disabled=0.0,Dead=0.0))
# cycleMT<-M$cycles(24L,hcc.pop=FALSE,hcc.cost=FALSE,hcc.QALY=FALSE)

The output, after rounding, of thecycles function is the Markov trace, shownbelow, which replicates Table 22. In more recent usage,cumulative utility is normally called incremental utility, and expressed perpatient (i.e., divided by 10,000).

YearsWellDisabledCumulative.Utility
01000000
1600020007400
23600240012680
32160216016352
230123749
240023749

Acknowledgements

In addition to using base R3,redecision relies ontheR6 implementation of classes4 and therlang package forerror handling and non-standard evaluation used in expression model variables5. Building the package vignettes and documentation relies on thetestthat package6, thedevtools package7,rmarkdown10 andknitr11.

Underpinning graph theory is based on terminology, definitions andalgorithms from Grosset al12, the Wikipediaglossary13 and links therein. Topological sorting of graphsis based on Kahn’s algorithm14. Some of the terminology for decisiontrees was based on the work of Kaminskiet al15 and anefficient tree drawing algorithm was based on the work of Walker16.In semi-Markov models, representations are exported in theDOT language17.

Terminology for decision trees and Markov models in health economic evaluationwas based on the book by Briggset al1 and the output formatand terminology follows ISPOR recommendations19.

Citations for examples used in vignettes are given in applicable vignettefiles.

References

1.Briggs, A., Claxton, K. & Sculpher, M.Decision modelling for health economic evaluation. (Oxford University Press, 2006).

2.Sonnenberg, F. A. & Beck, J. R.Markov Models in Medical Decision Making: A Practical Guide.Medical Decision Making13, 322–338 (1993).

3.R Core Team. R: A language and environment for statistical computing. (2021). at <https://www.R-project.org/>

4.Chang, W. R6: Encapsulated classes with reference semantics. (2020). at <https://CRAN.R-project.org/package=R6>

5.Henry, L. & Wickham, H. Rlang: Functions for base types and core r and tidyverse features. (2020). at <https://CRAN.R-project.org/package=rlang>

6.Wickham, H.Testthat: Get started with testing.The R Journal3, 5–10 (2011).

7.Wickham, H., Hester, J. & Chang, W. Devtools: Tools to make developing r packages easier. (2020). at <https://CRAN.R-project.org/package=devtools>

8.Xie, Y., Allaire, J. J. & Grolemund, G.R markdown: The definitive guide. (Chapman; Hall/CRC, 2018). at <https://bookdown.org/yihui/rmarkdown>

9.Allaire, J., Xie, Y., McPherson, J., Luraschi, J., Ushey, K., Atkins, A., Wickham, H., Cheng, J., Chang, W. & Iannone, R. Rmarkdown: Dynamic documents for r. (2020). at <https://github.com/rstudio/rmarkdown>

10.Xie, Y., Dervieux, C. & Riederer, E.R markdown cookbook. (Chapman; Hall/CRC, 2020). at <https://bookdown.org/yihui/rmarkdown-cookbook>

11.Xie, Y. Knitr: A General-Purpose Package for Dynamic Report Generation in R. (2024). at <https://yihui.org/knitr/>

12.Gross, J. L., Yellen, J. & Zhang, P.Handbook of Graph Theory. (Chapman; Hall/CRC., 2013). at <https://doi.org/10.1201/b16132>

13.Wikipedia. Glossary of graph theory.Wikipedia (2021). at <https://en.wikipedia.org/wiki/Glossary_of_graph_theory>

14.Kahn, A. B.Topological sorting of large networks.Communications of the ACM5, 558–562 (1962).

15.Kamiński, B., Jakubczyk, M. & Szufel, P.A framework for sensitivity analysis of decision trees.Central European Journal of Operational Research26, 135–159 (2018).

16.Walker, J. Q.A node-positioning algorithm for general trees. (University of North Carolina, 1989). at <http://www.cs.unc.edu/techreports/89-034.pdf>

17.Gansner, E. R., Koutsofios, E., North, S. C. & Vo, K.-P.A technique for drawing directed graphs.IEEE Transactions on Software Engineering19, 214–230 (1993).

18.Briggs, A. H., Weinstein, M. C., Fenwick, E. A. L., Karnon, J., Sculpher, M. J. & Paltiel, A. D.Model Parameter Estimation and Uncertainty: A Report of the ISPOR-SMDM Modeling Good Research Practices Task Force-6.Value in Health15, 835–842 (2012).

19.Siebert, U., Alagoz, O., Bayoumi, A. M., Jahn, B., Owens, D. K., Cohen, D. J. & Kuntz, K. M.State-Transition Modeling: A Report of the ISPOR-SMDM Modeling Good Research Practices Task Force-3.Value in Health15, 812–820 (2012).

About

Decision Analytic Modelling In Health Economics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp