Package: hesim 0.5.5

Devin Incerti

hesim: Health Economic Simulation Modeling and Decision Analysis

A modular and computationally efficient R package for parameterizing, simulating, and analyzing health economic simulation models. The package supports cohort discrete time state transition models (Briggs et al. 1998) <doi:10.2165/00019053-199813040-00003>, N-state partitioned survival models (Glasziou et al. 1990) <doi:10.1002/sim.4780091106>, and individual-level continuous time state transition models (Siebert et al. 2012) <doi:10.1016/j.jval.2012.06.014>, encompassing both Markov (time-homogeneous and time-inhomogeneous) and semi-Markov processes. Decision uncertainty from a cost-effectiveness analysis is quantified with standard graphical and tabular summaries of a probabilistic sensitivity analysis (Claxton et al. 2005, Barton et al. 2008) <doi:10.1002/hec.985>, <doi:10.1111/j.1524-4733.2008.00358.x>. Use of C++ and data.table make individual-patient simulation, probabilistic sensitivity analysis, and incorporation of patient heterogeneity fast.

Authors:Devin Incerti [aut, cre], Jeroen P. Jansen [aut], Mark Clements [aut], R Core Team [ctb]

hesim_0.5.5.tar.gz
hesim_0.5.5.zip(r-4.5)hesim_0.5.5.zip(r-4.4)hesim_0.5.5.zip(r-4.3)
hesim_0.5.5.tgz(r-4.4-x86_64)hesim_0.5.5.tgz(r-4.4-arm64)hesim_0.5.5.tgz(r-4.3-x86_64)hesim_0.5.5.tgz(r-4.3-arm64)
hesim_0.5.5.tar.gz(r-4.5-noble)hesim_0.5.5.tar.gz(r-4.4-noble)
hesim_0.5.5.tgz(r-4.4-emscripten)hesim_0.5.5.tgz(r-4.3-emscripten)
hesim.pdf |hesim.html
hesim/json (API)

# Install 'hesim' in R:
install.packages('hesim', repos = c('https://hesim-dev.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/hesim-dev/hesim/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • mstate3_exdata - Example data for a reversible 3-state multi-state model
  • multinom3_exdata - Example data for a 3-state multinomial model
  • onc3 - Multi-state oncology data for 3-state model
  • onc3p - Multi-state panel oncology data for 3-state model
  • psm4_exdata - Example data for a 4-state partitioned survival model

On CRAN:

health-economic-evaluationmicrosimulationsimulation-modeling

8.27 score 65 stars 40 scripts 707 downloads 85 exports 56 dependencies

Last updated 2 months agofrom:bb52350051. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 17 2024
R-4.5-win-x86_64OKNov 17 2024
R-4.5-linux-x86_64OKNov 17 2024
R-4.4-win-x86_64OKNov 17 2024
R-4.4-mac-x86_64OKNov 17 2024
R-4.4-mac-aarch64OKNov 17 2024
R-4.3-win-x86_64OKNov 17 2024
R-4.3-mac-x86_64OKNov 17 2024
R-4.3-mac-aarch64OKNov 17 2024

Exports:apply_rras_array3as_pfs_osas_tbl2as.data.tableautoplotceacea_pwCohortDtstmCohortDtstmTranscreate_CohortDtstmcreate_CohortDtstmTranscreate_IndivCtstmTranscreate_input_matscreate_lines_dtcreate_paramscreate_PsmCurvescreate_StateValscreate_trans_dtCtstmTransdefine_modeldefine_rngdefine_tparamsdweibullNMAeval_modeleval_rngexpandexpmatfast_rgengammaflexsurvreg_listformula_listget_labelshesim_datahesim_survdistshweibullNMAHweibullNMAiceaicea_pwicericer_tblid_attributesincr_effectIndivCtstmIndivCtstmTransinput_matslm_listmean_weibullNMAmom_betamom_gammamultinom_listparams_lmparams_mlogitparams_mlogit_listparams_survparams_surv_listpartsurvfitplot_ceacplot_ceafplot_ceplaneplot_evpiPsmPsmCurvespweibullNMAqmatrixqweibullNMArcatrdirichlet_matrmst_weibullNMArpwexprweibullNMAset_labelssim_costssim_evsim_qalyssim_stateprobsstateval_tblStateValssurv_quantilesurvivaltime_intervalstparams_meantparams_transprobstpmatrixtpmatrix_idtpmatrix_names

Dependencies:assertthatbbmlebdsmatrixBHclicolorspacecpp11data.tabledeSolvedplyrexpmfansifarverfastGHQuadflexsurvgenericsggplot2gluegtableisobandlabelinglatticelifecyclemagrittrMASSMatrixmgcvmsmmstatemuhazmunsellmvtnormnlmenumDerivpillarpkgconfigpurrrquadprogR6RColorBrewerRcppRcppArmadillorlangrstpm2scalesstatmodstringistringrsurvivaltibbletidyrtidyselectutf8vctrsviridisLitewithr

Cost-effectiveness analysis

Rendered fromcea.Rmdusingknitr::rmarkdownon Nov 17 2024.

Last update: 2021-02-15
Started: 2020-09-17

Introduction to hesim

Rendered fromintro.Rmdusingknitr::rmarkdownon Nov 17 2024.

Last update: 2021-02-17
Started: 2018-05-19

Markov and semi-Markov multi-state models

Rendered frommstate.Rmdusingknitr::rmarkdownon Nov 17 2024.

Last update: 2021-07-25
Started: 2020-03-09

Markov models with multinomial logistic regression

Rendered frommlogit.Rmdusingknitr::rmarkdownon Nov 17 2024.

Last update: 2021-07-09
Started: 2020-02-29

Partitioned survival models

Rendered frompsm.Rmdusingknitr::rmarkdownon Nov 17 2024.

Last update: 2021-03-06
Started: 2018-07-30

Simple Markov cohort model

Rendered frommarkov-cohort.Rmdusingknitr::rmarkdownon Nov 17 2024.

Last update: 2021-02-15
Started: 2020-09-17

Time inhomogeneous Markov cohort models

Rendered frommarkov-inhomogeneous-cohort.Rmdusingknitr::rmarkdownon Nov 17 2024.

Last update: 2021-02-15
Started: 2020-09-17

Time inhomogeneous Markov individual-level models

Rendered frommarkov-inhomogeneous-indiv.Rmdusingknitr::rmarkdownon Nov 17 2024.

Last update: 2022-03-30
Started: 2020-09-17

Readme and manuals

Help Manual

Help pageTopics
Apply relative risks to transition probability matricesapply_rr
Convert between 2D tabular objects and 3D arraysas_array3 as_tbl2
Convert multi-state data to PFS and OS dataas_pfs_os
Coerce to 'data.table'as.data.table.tparams_transprobs
Plot state probabilitiesautoplot.stateprobs
Plot survival curvesautoplot.survival
A cost-effectiveness objectce
Cost-effectiveness analysiscea cea.ce cea.default cea_pw cea_pw.ce cea_pw.default
Cohort discrete time state transition modelCohortDtstm
Transitions for a cohort discrete time state transition modelCohortDtstmTrans
Costs objectcosts
Create 'CohortDtstm' objectcreate_CohortDtstm create_CohortDtstm.model_def
Create 'CohortDtstmTrans' objectcreate_CohortDtstmTrans create_CohortDtstmTrans.msm create_CohortDtstmTrans.multinom_list create_CohortDtstmTrans.params_mlogit_list
Create 'IndivCtstmTrans' objectcreate_IndivCtstmTrans create_IndivCtstmTrans.flexsurvreg create_IndivCtstmTrans.flexsurvreg_list create_IndivCtstmTrans.params_surv create_IndivCtstmTrans.params_surv_list
Create a parameter object from a fitted modelcreate_params create_params.flexsurvreg create_params.flexsurvreg_list create_params.lm create_params.multinom create_params.multinom_list create_params.partsurvfit
Create 'PsmCurves' objectcreate_PsmCurves create_PsmCurves.flexsurvreg_list create_PsmCurves.params_surv_list
Create a 'StateVals' objectcreate_StateVals create_StateVals.lm create_StateVals.stateval_tbl
Create a data table of health state transitionscreate_trans_dt
Define and evaluate model expressiondefine_model eval_model
Define and evaluate random number generation expressionsdefine_rng eval_rng
Define and evaluate transformed parameter expressionsdefine_tparams eval_tparams
Disease progression objectdisprog
Expand hesim_dataexpand.hesim_data
Matrix exponentialexpmat
Random generation for generalized gamma distributionfast_rgengamma
List of 'flexsurvreg' objectsflexsurvreg_list
Get value labelsget_labels
Data for health economic simulation modelinghesim_data
Incremental cost-effectiveness ratioformat.icer icer
Incremental treatment effectincr_effect
Individual-level continuous time state transition modelIndivCtstm
Transitions for an individual-level continuous time state transition modelIndivCtstmTrans
Input matrices for a statistical modelas.data.table.input_mats input_mats print.input_mats
Method of moments for beta distributionmom_beta
Method of moments for gamma distributionmom_gamma
Example data for a reversible 3-state multi-state modelmstate3_exdata
List of 'multinom' objectsmultinom_list
Example data for a 3-state multinomial modelmultinom3_exdata
Multi-state oncology data for 3-state modelonc3
Multi-state panel oncology data for 3-state modelonc3p
Parameter objectparams
Parameters of a linear modelparams_lm
Parameters of a multinomial logit modelparams_mlogit print.params_mlogit
Parameters of a list of multinomial logit modelsparams_mlogit_list
Parameters of a survival modelparams_surv print.params_surv
Parameters of a list of survival modelsparams_surv_list
Plot cost-effectiveness acceptability curveplot_ceac plot_ceac.cea plot_ceac.cea_pw
Plot cost-effectiveness acceptability frontierplot_ceaf
Plot cost-effectiveness planeplot_ceplane
Plot expected value of perfect informationplot_evpi
N-state partitioned survival modelPsm
Example data for a 4-state partitioned survival modelpsm4_exdata
Partitioned survival curvesPsmCurves
Quality-adjusted life-years objectqalys
Transition intensity matrix from tabular objectqmatrix.data.frame qmatrix.data.table qmatrix.matrix
Transition intensity matrix from 'msm' objectqmatrix.msm
Random generation for categorical distributionrcat
Random generation for multiple Dirichlet distributionsrdirichlet_mat
Random number generation distributionsbeta_rng custom dirichlet_rng fixed gamma_rng lognormal_rng multi_normal_rng normal_rng rng_distributions uniform_rng
Random generation for piecewise exponential distributionrpwexp
Set value labelsset_labels
Expected values from state probabilitiessim_costs sim_ev sim_ev.stateprobs sim_qalys
Simulate state probabilities from survival curvessim_stateprobs.survival
State probability objectstateprobs
Table to store state value parametersstateval_tbl
Model for state valuesStateVals
Summary method for cost-effectiveness objectformat.summary.ce summary.ce
Summarize 'eval_rng' objectprint.eval_rng summary.eval_rng
Summarize parameter objectssummary.params summary.params_lm summary.params_mlogit summary.params_mlogit_list summary.params_surv summary.params_surv_list
Summarize 'tparams_mean' objectprint.tparams_mean summary.tparams_mean
Summarize 'tparams_transprobs' objectsummary.tparams_transprobs
Summarize transition probability matrixsummary.tpmatrix
Survival quantilessurv_quantile
Survival objectsurvival
Time intervalstime_intervals
Transformed parameter objecttparams
Predicted meanstparams_mean
Transition probabilitiesprint.tparams_transprobs tparams_transprobs tparams_transprobs.array tparams_transprobs.data.frame tparams_transprobs.data.table tparams_transprobs.tpmatrix
Transition probability matrixtpmatrix
Transition probability matrix IDstpmatrix_id
Names for elements of a transition probability matrixtpmatrix_names