Package: epicR 1.0.1

Amin Adibi

epicR: Evaluation Platform in Chronic Obstructive Pulmonary Disease

Evaluation Platform in Chronic Obstructive Pulmonary Disease (EPIC) is a Discrete Event Simulation (DES) model that simulates health outcomes of patients with Chronic Obstructive Pulmonary Disease (COPD) based on demographics and individual-level risk factors, based on the model published in Sadatsafavi et al. (2019) <doi:10.1177/0272989X18824098>.

Authors:Mohsen Sadatsafavi [aut, cph], Amin Adibi [aut, cre], Kate Johnson [aut]

epicR_1.0.1.tar.gz
epicR_1.0.1.zip(r-4.7)epicR_1.0.1.zip(r-4.6)epicR_1.0.1.zip(r-4.5)
epicR_1.0.1.tgz(r-4.6-x86_64)epicR_1.0.1.tgz(r-4.6-arm64)epicR_1.0.1.tgz(r-4.5-x86_64)epicR_1.0.1.tgz(r-4.5-arm64)
epicR_1.0.1.tar.gz(r-4.7-arm64)epicR_1.0.1.tar.gz(r-4.7-x86_64)epicR_1.0.1.tar.gz(r-4.6-arm64)epicR_1.0.1.tar.gz(r-4.6-x86_64)
epicR_1.0.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
epicR/json (API)

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

Bug tracker:https://github.com/resplab/epicr/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

openblascpp

8.02 score 13 stars 45 scripts 526 downloads 59 exports 55 dependencies

Last updated from:5c8938c7c7. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK244
linux-devel-x86_64OK250
source / vignettesOK335
linux-release-arm64OK220
linux-release-x86_64OK227
macos-release-arm64OK158
macos-release-x86_64OK308
macos-oldrel-arm64OK148
macos-oldrel-x86_64OK401
windows-develOK271
windows-releaseOK269
windows-oldrelOK263
wasm-releaseOK155

Exports:calc_event_stack_sizecalibrate_COPD_inccalibrate_explicit_mortalitycalibrate_explicit_mortality2calibrate_smokingcopy_configs_to_userestimate_memory_requiredexport_figuresexpress_matrixget_agent_eventsget_agent_size_bytesget_all_eventsget_all_events_matrixget_available_memoryget_default_settingsget_errorsget_eventget_events_by_typeget_inputget_inputsget_list_elementsget_n_eventsget_outputget_output_exget_progressget_runtime_statsget_sample_outputget_settingsget_smithget_user_config_dirlist_available_jurisdictionsmvrnormArmareport_COPD_by_ctimereport_exacerbation_by_timereset_model_inputreset_user_configsresumesanity_checksanity_COPDset_input_varset_settings_varsimulatetest_case_detectionuser_config_existsvalidate_configvalidate_COPDvalidate_diagnosisvalidate_exacerbationvalidate_gpvisitsvalidate_lung_functionvalidate_medicationvalidate_mortalityvalidate_overdiagnosisvalidate_payoffsvalidate_populationvalidate_smokingvalidate_survivalvalidate_symptomsvalidate_treatment

Dependencies:bitbit64blobcachemchronclicliprcpp11crayonDBIdplyrfarverfastmapgenericsggplot2ggthemesgluegsubfngtablehmsisobandjsonlitelabelinglifecyclemagrittrmemoisepillarpkgconfigplyrprettyunitsprogressprotopurrrR6RColorBrewerRcppRcppArmadilloreadrreshape2rlangRSQLiteS7scalessqldfstringistringrtibbletidyrtidyselecttzdbutf8vctrsviridisLitevroomwithr

Adding a New Country to epicR

Rendered fromAddingNewCountry.Rmdusingknitr::rmarkdownon May 10 2026.

Last update: 2026-03-09
Started: 2025-11-10

EPIC Background

Rendered fromBackgroundEPIC.Rmdusingknitr::rmarkdownon May 10 2026.

Last update: 2026-03-03
Started: 2025-06-18

Getting Started with EPIC

Rendered fromGettingStarted.Rmdusingknitr::rmarkdownon May 10 2026.

Last update: 2025-12-13
Started: 2022-09-21

Inputs and Outputs Structure

Rendered fromInputsOutputsStructure.Rmdusingknitr::rmarkdownon May 10 2026.

Last update: 2026-03-09
Started: 2026-01-08

Readme and manuals

Help Manual

Help pageTopics
'epicR' packageepicR-package epicR
Calculate recommended event_stack_size for a given number of agentscalc_event_stack_size
Solves stochastically for COPD incidence rate equation.calibrate_COPD_inc
Calibrates explicit mortalitycalibrate_explicit_mortality
Calibrates explicit mortality by Amincalibrate_explicit_mortality2
Calibrates smokingcalibrate_smoking
Copy default configs to user directorycopy_configs_to_user
epicR Configuration Managementconfig configuration epicR-config
Estimate memory required for simulationestimate_memory_required
Runs the model and exports an excel file with all output dataexport_figures
Express matrix.express_matrix
Returns all events of an agent.get_agent_events
Returns the size of agent struct in bytesget_agent_size_bytes
Returns all events.get_all_events
Returns a matrix containing all eventsget_all_events_matrix
Get available system memory (platform-specific)get_available_memory
Exports default settingsget_default_settings
Returns errorsget_errors
Returns the events stack.get_event
Returns all events of a certain type.get_events_by_type
Returns a list of default model input valuesget_input
Returns inputsget_inputs
Get list elementsget_list_elements
Returns total number of events.get_n_events
Main outputs of the current run.get_output
Extra outputs from the modelget_output_ex
Returns current simulation progress.get_progress
Returns run time stats.get_runtime_stats
Returns a sample output for a given year and gender.get_sample_output
Returns current settings.get_settings
Returns agent Smith.get_smith
Get user config directory pathget_user_config_dir
Initializes a model. Allocates memory to the C engine.init_session
List available config jurisdictionslist_available_jurisdictions
Samples from a multivariate normalmvrnormArma
Reports COPD related stats.report_COPD_by_ctime
Reports exacerbation-related stats.report_exacerbation_by_time
Reset the cached model inputreset_model_input
Reset user configs to package defaultsreset_user_configs
Resumes running of model.resume
Basic tests of model functionality. Serious issues if the test does not pass.sanity_check
Basic COPD test.sanity_COPD
Sets input variables.set_input_var
Sets model settings.set_settings_var
Convenience function: run simulation and return resultssimulate
Terminates a session and releases allocated memory.terminate_session
Returns results of Case Detection strategiestest_case_detection
Check if user config existsuser_config_exists
Validate a config filevalidate_config
Returns results of validation tests for COPDvalidate_COPD
Returns results of validation tests for diagnosisvalidate_diagnosis
Returns results of validation tests for exacerbation ratesvalidate_exacerbation
Returns results of validation tests for GP visitsvalidate_gpvisits
Returns results of validation tests for lung functionvalidate_lung_function
Returns results of validation tests for medication module.validate_medication
Returns results of validation tests for mortality ratevalidate_mortality
Returns results of validation tests for overdiagnosisvalidate_overdiagnosis
Returns results of validation tests for payoffs, costs and QALYsvalidate_payoffs
Returns simulated vs. predicted population table and a plotvalidate_population
Returns results of validation tests for smoking module.validate_smoking
Returns the Kaplan Meier curve comparing COPD and non-COPDvalidate_survival
Returns results of validation tests for Symptomsvalidate_symptoms
Returns results of validation tests for Treatmentvalidate_treatment