Package: WARDEN 2.0.2

WARDEN: Workflows for Health Technology Assessments in R using Discrete EveNts

Toolkit to support and perform discrete event simulations with and without resource constraints in the context of health technology assessments (HTA). The package focuses on cost-effectiveness modelling and aims to be submission-ready to relevant HTA bodies in alignment with 'NICE TSD 15' <https://sheffield.ac.uk/nice-dsu/tsds/patient-level-simulation>. More details an examples can be found in the package website <https://jsanchezalv.github.io/WARDEN/>.

Authors:Javier Sanchez Alvarez [aut, cre], Gabriel Lemyre [ctb], Valerie Aponte Ribero [ctb]

WARDEN_2.0.2.tar.gz
WARDEN_2.0.2.zip(r-4.6)WARDEN_2.0.2.zip(r-4.5)
WARDEN_2.0.2.tgz(r-4.6-x86_64)WARDEN_2.0.2.tgz(r-4.6-arm64)WARDEN_2.0.2.tgz(r-4.5-x86_64)WARDEN_2.0.2.tgz(r-4.5-arm64)
WARDEN_2.0.2.tar.gz(r-4.6-arm64)WARDEN_2.0.2.tar.gz(r-4.6-x86_64)WARDEN_2.0.2.tar.gz(r-4.5-arm64)WARDEN_2.0.2.tar.gz(r-4.5-x86_64)
WARDEN_2.0.2.tgz(r-4.5-emscripten)
WARDEN.pdf |WARDEN.html
WARDEN/json (API)
NEWS

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

Bug tracker:https://github.com/jsanchezalv/warden/issues

Pkgdown/docs site:https://jsanchezalv.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

Conda:

cpp

6.82 score 12 stars 17 scripts 264 downloads 67 exports 64 dependencies

Last updated from:3a623a0d86. Checks:11 OK, 1 NOTE, 1 WARNING. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK186
linux-devel-x86_64OK212
source / vignettesOK286
linux-release-arm64OK191
linux-release-x86_64OK185
macos-devel-arm64NOTE149
macos-devel-x86_64OK304
macos-release-arm64OK151
macos-release-x86_64OK288
windows-develWARNING200
windows-releaseOK213
windows-oldrelOK191
wasm-releaseOK157

Exports:add_itemadd_item2add_reactevtadd_tteadj_valast_as_listceac_descond_dirichletcond_mvncreate_indicatorsdisc_cycledisc_cycle_vdisc_instantdisc_instant_vdisc_ongoingdisc_ongoing_vdiscrete_resource_clonedraw_tteevpi_desextract_elements_from_listextract_from_reactionsextract_psa_resultget_eventhas_eventluck_adjmodify_eventmodify_itemmodify_item_seqnew_eventnext_eventnext_event_ptpcond_gompertzpick_psapick_val_vqbeta_mseqcond_expqcond_gammaqcond_gompertzqcond_llogisqcond_lnormqcond_normqcond_weibullqcond_weibullPHqgamma_mseqtimecovqueue_createqueue_emptyqueue_sizerandom_streamrbeta_msercond_gompertzrcond_gompertz_lurdirichletrdirichlet_probremove_eventreplicate_profilesresource_discretergamma_mserpoisgammarpoisgamma_rcpprun_simrun_sim_parallelsens_iteratorshared_inputsummary_results_detsummary_results_senssummary_results_sim

Dependencies:assertthatbbmlebdsmatrixclicodetoolscpp11data.tabledeSolvedigestdoFuturedplyrfarverfastGHQuadflexsurvforeachfuturefuture.applygenericsggplot2globalsgluegtableisobanditeratorslabelinglatticelifecyclelistenvlsodamagrittrMASSMatrixmgcvmstatemuhazmvtnormnlmenumDerivparallellypillarpkgconfigprogressrpurrrquadprogR6RColorBrewerRcppRcppArmadillorlangrstpm2S7scalesstatmodstringistringrsurvivaltibbletidyrtidyselectutf8vctrsviridisLitewithrzoo

Example for a Sick-Sicker-Dead model

Rendered fromexample_ssd.Rmdusingknitr::rmarkdownon Mar 21 2026.

Last update: 2026-02-27
Started: 2021-10-22

Readme and manuals

Help Manual

Help pageTopics
Define or append model inputsadd_item
Define parameters that may be used in model calculations (uses expressions)add_item2
Define the modifications to other events, costs, utilities, or other items affected by the occurrence of the eventadd_reactevt
Define events and the initial event timeadd_tte
Adjusted Value Calculationadj_val
Transform a substituted expression to its Abstract Syntax Tree (AST) as a listast_as_list
Calculate the cost-effectiveness acceptability curve (CEAC) for a DES model with a PSA resultceac_des
Calculate conditional dirichlet valuescond_dirichlet
Calculate conditional multivariate normal valuescond_mvn
Creates a vector of indicators (0 and 1) for sensitivity/DSA analysiscreate_indicators
Cycle discountingdisc_cycle
Cycle discounting for vectorsdisc_cycle_v
Calculate instantaneous discounted costs or qalysdisc_instant
Calculate instantaneous discounted costs or qalys for vectorsdisc_instant_v
Calculate discounted costs and qalys between eventsdisc_ongoing
Calculate discounted costs and qalys between events for vectorsdisc_ongoing_v
Clone independent discrete resourcesdiscrete_resource_clone
Draw a time to event from a list of parametric survival functionsdraw_tte
Calculate the Expected Value of Perfect Information (EVPI) for a DES model with a PSA resultevpi_des
Extracts items and events by looking into assignments, modify_event and new_eventextract_elements_from_list
Extract all items and events and their interactions from the event reactions listextract_from_reactions
Extract PSA results from a treatmentextract_psa_result
Get a specific event timeget_event
Check if a Patient Has a Specific Eventhas_event
Perform luck adjustmentluck_adj
Modify or Add Events for a Patientmodify_event
Modify the value of existing itemsmodify_item
Modify the value of existing itemsmodify_item_seq
Add Events to the Queue for a Patientnew_event
Get the Next Event(s) in the Queuenext_event
Get the Next Event(s) in the Queue for a specific patientnext_event_pt
Survival Probaility function for conditional Gompertz distribution (lower bound only)pcond_gompertz
Helper function to create a list with random draws or whenever a series of functions needs to be called. Can be implemented within 'pick_val_v'.pick_psa
Select which values should be applied in the corresponding loop for several values (vector or list).pick_val_v
Pop and Return the Next Eventpop_and_return_event
Remove the Next Event from the Queuepop_event
Draw from a beta distribution based on mean and se (quantile)qbeta_mse
Conditional quantile function for exponential distributionqcond_exp
Conditional quantile function for gamma distributionqcond_gamma
Quantile function for conditional Gompertz distribution (lower bound only)qcond_gompertz
Conditional quantile function for loglogistic distributionqcond_llogis
Conditional quantile function for lognormal distributionqcond_lnorm
Conditional quantile function for normal distributionqcond_norm
Conditional quantile function for weibull distributionqcond_weibull
Conditional quantile function for WeibullPH (flexsurv)qcond_weibullPH
Use quantiles from a gamma distribution based on mean and seqgamma_mse
Draw Time-to-Event with Time-Dependent Covariates and Luck Adjustmentqtimecov
Create a New Event Queuequeue_create
Check if the Event Queue is Emptyqueue_empty
Get the Size of the Event Queuequeue_size
Creates an environment (similar to R6 class) of random uniform numbers to be drawn fromrandom_stream
Draw from a beta distribution based on mean and serbeta_mse
Draw from a conditional Gompertz distribution (lower bound only)rcond_gompertz
Draw from a Conditional Gompertz distribution (lower and upper bound)rcond_gompertz_lu
Draw from a dirichlet distribution based on number of counts in transition. Adapted from brms::rdirichletrdirichlet
Draw from a dirichlet distribution based on mean transition probabilities and standard errorsrdirichlet_prob
Remove Events for a Patientremove_event
Replicate profiles data.framereplicate_profiles
Create a Discrete Resourceresource_discrete
Draw from a gamma distribution based on mean and sergamma_mse
Draw time to event (tte) from a Poisson or Poisson-Gamma (PG) Mixture/Negative Binomial (NB) Processrpoisgamma
Draw time to event (tte) from a Poisson or Poisson-Gamma (PG) Mixture/Negative Binomial (NB) Process using C++rpoisgamma_rcpp
Run the simulationrun_sim
Run simulations in parallel mode (at the simulation level)run_sim_parallel
Create an iterator based on sens of the current iteration within a scenario (DSA)sens_iterator
Shared input objectshared_input
Deterministic results for a specific treatmentsummary_results_det
Summary of sensitivity outputs for a treatmentsummary_results_sens
Summary of PSA outputs for a treatmentsummary_results_sim
Example TTE IPD datatte.df