Title: Decision-Analytic Modelling for Depression Prevention and Treatment
Version: 0.1.0
Description: Provides functions and example datasets to run a decision-analytic model for prevention and treatment strategies across depression severity states (sub-clinical, mild, moderate, severe, and recurrent). The package supports scenario analyses (base and alternative inputs) and summarises outcomes such as coverage, adherence, effect sizes, and healthcare costs.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.3
Imports: shiny, stats, utils, DT, DiagrammeR, tidyverse, bslib, here
Depends: R (≥ 3.5)
LazyData: true
Suggests: testthat (≥ 3.0.0)
Config/testthat/edition: 3
NeedsCompilation: no
Packaged: 2026-02-09 10:29:40 UTC; 85304spe
Author: Stijn Peeters ORCID iD [aut, cre], Frederick Thielen ORCID iD [aut], Ben Wijnen ORCID iD [aut]
Maintainer: Stijn Peeters <s.b.peeters@eshpm.eur.nl>
Repository: CRAN
Date/Publication: 2026-02-11 20:10:08 UTC

Intervention: prevention of recurrent depression (alternative)

Description

Alternative scenario intervention parameters for the prevention of recurrent depression. Structure matches the base dataset. Values can be adjusted to reflect alternative modelling assumptions. In this dataset, the same numbers are provided as in the base case.

Usage

data(data_prev_rec_alt)

Format

Same structure as data_prev_rec_alt.


Intervention: prevention of recurrent depression (base)

Description

Baseline intervention parameters for the prevention of recurrent depression among individuals with prior depressive episodes. Includes coverage, adherence, effect size, sample size, and healthcare costs.

Usage

data(data_prev_rec_base)

Format

Same structure as data_prev_sub_base.


Intervention: prevention of sub-clinical depression (alternative)

Description

This dataset contains alternative scenario intervention parameters for the prevention of sub-clinical depression in the DepMod model. The structure is identical to the base dataset but can represent alternative modelling assumptions. In this dataset, the same numbers are provided as in the base case.

Usage

data(data_prev_sub_alt)

Format

A data frame with the same columns as data_prev_sub_alt.


Intervention: prevention of sub-clinical depression (base)

Description

This dataset contains baseline intervention parameters for the prevention of sub-clinical depression in the DepMod model. It includes coverage, adherence, effectiveness, sample size, and healthcare costs.

Usage

data(data_prev_sub_base)

Format

A data frame with one row per intervention strategy and columns:

cov

Coverage of the intervention (proportion of target population).

adh

Adherence to the intervention (proportion).

1-RR

Effect size or relative risk reduction (numeric).

n

Sample size or study population used for the parameter estimate.

healthcare costs

Estimated healthcare costs per person.

Details

Used to compute the overall preventive effect for sub-clinical depression in the simulation model.


Intervention: treatment of mild depression (alternative)

Description

Alternative scenario parameters for the treatment of mild depression. The structure matches the base dataset but values can be adjusted to reflect alternative modelling assumptions. In this dataset, the same numbers are provided as in the base case.

Usage

data(data_tr_mild_alt)

Format

Same structure as data_tr_mild_base.


Intervention: treatment of mild depression (base)

Description

Baseline intervention parameters for the treatment of mild depression episodes. Includes coverage, adherence, effectiveness, sample size, and healthcare costs.

Usage

data(data_tr_mild_base)

Format

A data frame with one row per intervention strategy and columns:

cov

Coverage of the intervention (proportion of mild cases).

adh

Adherence to the intervention (proportion).

d

Effect size or relative risk reduction (numeric).

n

Sample size or study population used for the estimate.

healthcare costs

Estimated healthcare costs per person.


Intervention: treatment of moderate depression (alternative)

Description

Alternative scenario parameters for the treatment of moderate depression, structurally identical to the base dataset. Values can be adjusted to reflect alternative modelling assumptions. In this dataset, the same numbers are provided as in the base case.

Usage

data(data_tr_mod_alt)

Format

Same structure as data_tr_mod_base.


Intervention: treatment of moderate depression (base)

Description

Baseline intervention parameters for the treatment of moderate depression episodes. Includes coverage, adherence, effect size, sample size, and healthcare costs.

Usage

data(data_tr_mod_base)

Format

Same structure as data_tr_mild_base.


Intervention: treatment of severe depression (alternative)

Description

Alternative intervention parameters for the treatment of severe depression episodes. Structure matches the base dataset. Values can be adjusted to reflect alternative modelling assumptions. In this dataset, the same numbers are provided as in the base case.

Usage

data(data_tr_sev_alt)

Format

Same structure as data_tr_sev_alt.


Intervention: treatment of severe depression (base)

Description

Baseline intervention parameters for the treatment of severe depression episodes. Includes coverage, adherence, effectiveness, sample size, and healthcare costs.

Usage

data(data_tr_sev_base)

Format

Same structure as data_tr_sev_base.


Model parameters list

Description

A named list of scalar parameters used in the disease progression and cost-effectiveness model. Each element is a single numeric value.

Usage

data(parameter_list)

Format

A named list with 40 elements:

excess mortality

Excess mortality multiplier.

retirement rate

Annual retirement rate.

death rate

Baseline annual death rate.

mean duration of chronicity (year)

Mean duration of chronic disease (years).

increased relapse 1

Relapse multiplier for category 1.

increased relapse 2

Relapse multiplier for category 2.

increased relapse 3

Relapse multiplier for category 3.

increased relapse 4

Relapse multiplier for category 4.

increased relapse 5

Relapse multiplier for category 5.

discount rate daly averted

Annual discount rate applied to DALYs averted.

discount rate costs

Annual discount rate applied to costs.

dw conversion factor

Disability weight conversion factor.

Lower range dw conversion factor

Lower bound of the disability weight conversion factor.

Upper range dw conversion factor

Upper bound of the disability weight conversion factor.

Scale/shape Gamma cost distribution

Scale/shape parameter for a Gamma cost distribution.

Incidence no history

Incidence among individuals with no prior history.

pmild

Proportion of incident cases that are mild.

pmoderate

Proportion of incident cases that are moderate.

psevere

Proportion of incident cases that are severe.

mildrecovery

Probability of full recovery from mild disease.

mildpartial

Probability of partial recovery from mild disease.

mildchronic

Probability of chronic course after mild disease.

moderaterecovery

Probability of full recovery from moderate disease.

moderatepartial

Probability of partial recovery from moderate disease.

moderatechronic

Probability of chronic course after moderate disease.

severerecovery

Probability of full recovery from severe disease.

severepartial

Probability of partial recovery from severe disease.

severechronic

Probability of chronic course after severe disease.

mildrecoverycured

Among mild recoveries, probability of being cured.

mildrecoveryrelapse

Among mild recoveries, probability of relapse.

mildpartialcured

Among mild partial recoveries, probability of being cured.

mildpartialrelapse

Among mild partial recoveries, probability of relapse.

moderaterecoverycured

Among moderate recoveries, probability of being cured.

moderaterecoveryrelapse

Among moderate recoveries, probability of relapse.

moderatepartialcured

Among moderate partial recoveries, probability of being cured.

moderatepartialrelapse

Among moderate partial recoveries, probability of relapse.

severerecoverycured

Among severe recoveries, probability of being cured.

severerecoveryrelapse

Among severe recoveries, probability of relapse.

severepartialcured

Among severe partial recoveries, probability of being cured.

severepartialrelapse

Among severe partial recoveries, probability of relapse.

Examples

data(parameter_list)
names(parameter_list)
parameter_list[["excess mortality"]]

Run the Shiny app

Description

Launches the Shiny app included in this package.

Usage

run_app()

Value

No return value; called for its side effect of launching the Shiny application.

Examples

if (interactive()) {
  run_app()
}

Run base and alternative simulation models

Description

Wrapper for running the DepMod decision-analytic model under both base and alternative scenarios. The function first builds the transition matrix using func_first_part_model() and then runs fun_sim_model() for each scenario.

Usage

run_model(
  parameters = parameter_list,
  sim_runs = 1000,
  total_population = 10518000,
  df_prev_sub_base = data_prev_sub_base,
  df_tr_mild_base = data_tr_mild_base,
  df_tr_mod_base = data_tr_mod_base,
  df_tr_sev_base = data_tr_sev_base,
  df_prev_rec_base = data_prev_rec_base,
  df_prev_sub_alt = data_prev_sub_alt,
  df_tr_mild_alt = data_tr_mild_alt,
  df_tr_mod_alt = data_tr_mod_alt,
  df_tr_sev_alt = data_tr_sev_alt,
  df_prev_rec_alt = data_prev_rec_alt
)

Arguments

parameters

Named list of model parameters (see Details).

sim_runs

Integer. Number of simulation runs. Default is 1000.

total_population

Integer. Total population size used in the simulation. Default is 10518000.

df_prev_sub_base

Data frame for base scenario prevention (sub-clinical depression).

df_tr_mild_base

Data frame for base scenario treatment (mild depression).

df_tr_mod_base

Data frame for base scenario treatment (moderate depression).

df_tr_sev_base

Data frame for base scenario treatment (severe depression).

df_prev_rec_base

Data frame for base scenario prevention (recurrent depression).

df_prev_sub_alt

Data frame for alternative scenario prevention (sub-clinical depression).

df_tr_mild_alt

Data frame for alternative scenario treatment (mild depression).

df_tr_mod_alt

Data frame for alternative scenario treatment (moderate depression).

df_tr_sev_alt

Data frame for alternative scenario treatment (severe depression).

df_prev_rec_alt

Data frame for alternative scenario prevention (recurrent depression).

Details

The parameters list must contain numeric values controlling disease progression, recovery, relapse, disability weights, discounting, and cost accumulation. Required elements include:

General simulation parameters

dw_conversion_fact

Disability-weight conversion factor.

discount_rate_daly

Discount rate for DALYs.

scale_shape_gamma_cost

Gamma distribution scale/shape cost factor.

disc_rate_cost

Discount rate for economic costs.

leavemodel

Probability of leaving the model.

mean_dur_chron

Mean duration of chronic phase.

Population incidence inputs

incidence_no_history

Incidence among individuals without prior disease.

pmild

Proportion of incident mild cases.

pmoderate

Proportion of incident moderate cases.

psevere

Proportion of incident severe cases.

Stage-progression probabilities

mildrecovery

Recovery probability from mild depression.

mildpartial

Partial remission probability (mild).

mildchronic

Chronic transition probability (mild).

moderaterecovery

Recovery probability (moderate).

moderatepartial

Partial remission probability (moderate).

moderatechronic

Chronic transition probability (moderate).

severerecovery

Recovery probability (severe).

severepartial

Partial remission probability (severe).

severechronic

Chronic transition probability (severe).

Recovery-state outcomes

mildrecoverycured

Cure probability from mild–recovery.

mildrecoveryrelapse

Relapse probability from mild–recovery.

mildpartialcured

Cure probability from mild–partial.

mildpartialrelapse

Relapse probability from mild–partial.

moderaterecoverycured

Cure probability from moderate–recovery.

moderaterecoveryrelapse

Relapse probability from moderate–recovery.

moderatepartialcured

Cure probability from moderate–partial.

moderatepartialrelapse

Relapse probability from moderate–partial.

severerecoverycured

Cure probability from severe–recovery.

severerecoveryrelapse

Relapse probability from severe–recovery.

severepartialcured

Cure probability from severe–partial.

severepartialrelapse

Relapse probability from severe–partial.

Relapse multipliers

increased_relapse_1

Relapse multiplier (category 1).

increased_relapse_2

Relapse multiplier (category 2).

increased_relapse_3

Relapse multiplier (category 3).

increased_relapse_4

Relapse multiplier (category 4).

increased_relapse_5

Relapse multiplier (category 5).

Value

A list with two elements:

base

Model output using the base scenario.

alt

Model output using the alternative scenario.

#' @examples res <- run_model()

mirror server hosted at Truenetwork, Russian Federation.