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
DESCRIPTION
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 483 downloads 59 exports 55 dependencies

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

TargetResultTimeFilesSyslog
linux-devel-arm64OK236
linux-devel-x86_64OK236
source / vignettesOK345
linux-release-arm64OK241
linux-release-x86_64OK249
macos-release-arm64OK195
macos-release-x86_64OK359
macos-oldrel-arm64OK184
macos-oldrel-x86_64OK472
windows-develOK287
windows-releaseOK256
windows-oldrelOK212
wasm-releaseOK159

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
Introduction | Overview of the Configuration System | Current Configuration Files | Step-by-Step Guide to Adding a New Country | Step 1: Create the Configuration File | Step 2: Copy the Template Structure | Step 3: Parameter Categories to Configure | 3.1 Global Parameters | 3.2 Demographics and Population | 3.3 Smoking Patterns | 3.4 COPD Epidemiology | 3.5 Healthcare Costs | 3.6 Healthcare Utilization | Step 4: Data Collection Strategy | Essential Data Sources | Data Quality Considerations | Step 5: Parameter Estimation | 5.1 Regression Models | 5.2 Literature Meta-analysis | 5.3 Calibration | Step 6: Testing the New Configuration | 6.1 Test Loading | 6.2 Run Basic Simulation | 6.3 Validate Outputs | Step 7: Documentation | 7.1 Data Sources Documentation | 7.2 Parameter Assumptions | Example: Adding Germany | Quality Assurance | Validation Checklist | Common Issues and Solutions | Contributing Your Configuration | Conclusion

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

Inputs and Outputs Structure
Understanding Input Parameters | Retrieving Input Parameters | Input Structure Overview | Detailed Input Categories | Global Parameters (global_parameters) | Agent Demographics (agent) | Smoking Parameters (smoking) | COPD Parameters (COPD) | Lung Function Parameters (lung_function) | Exacerbation Parameters (exacerbation) | Symptom Parameters (symptoms) | Outpatient Parameters (outpatient) | Diagnosis Parameters (diagnosis) | Medication Parameters (medication) | Cost Parameters (cost) | Utility Parameters (utility) | Manual/Advanced Parameters (manual) | Accessing Parameter Help and References | Running Simulations with Custom Inputs | Output Structure | Basic Output (results$basic) | Extended Output (results$extended) | Population Counts by Time | Smoking Status by Time | COPD Outcomes by Time | Diagnosis Outcomes | Exacerbation Outcomes | Death Outcomes | Cost and QALY Outcomes | Additional Summary Statistics | Symptom and GP Visit Outcomes | Medication Outcomes | Event History (results$events) | Event Matrix Columns (33 columns) | Event Type Codes | Record Modes | Complete Example: Cost-Effectiveness Analysis | Important Notes

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

EPIC Background
1 Introduction | 2 The Study | 2.1 Background | What is a Dynamic Microsimulation? | Demographic and Risk Factor Module | COPD Occurence Module | Lung Function Module | Exacerbation Module | Exacerbation Severity | Mortality Module | Payoff Module | Smoking Module

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

Getting Started with EPIC
Introduction | What is EPIC? | Installation | Quick Start: Your First Simulation | Simple Approach (Recommended) | Choosing a Jurisdiction: Canada vs US | Customizing Your Simulation | Understanding Inputs | Common Input Modifications | Understanding Settings | Choosing the Number of Agents | Getting Detailed Results | Extended Output | Individual Patient Data | Event Types | Open vs Closed Cohort | Comparing Scenarios | Advanced Usage | Custom Input Modifications | Running Multiple Simulations | Error Handling | Troubleshooting | Memory Errors | Session Issues | Next Steps | References

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

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