run_forward_simulations: Run forward simulations

Description Usage Arguments Value

View source: R/run_forward_simulations.R

Description

Run forward simulations

Usage

1
2
run_forward_simulations(data, baseline_parameters,
  intervention_parameters = NULL, n_iter, seed = NULL)

Arguments

data

a list containing 4 elements:

patients

a dataframe with three columns. Each row corresponds to a patient, the columns are admission, first_positive_test and discharge. Entries are in days. If there is no positive test for a patient, first_positive_test equals 20000.

test_results_positive

a matrix. Each row corresponds to a patient. Entries correspond to the day of a positive test.

test_results_negative

a matrix. Each row corresponds to a patient. Entries correspond to the day of a negative test.

antibiotics

a matrix. Each row corresponds to a patient. Entries correspond to the day when an antibiotic was administered.

baseline_parameters

a dataframe with values of all the parameters of the transmission model:

beta

the transmission rate

b

the effect of antibiotics on transmissibility

s

the effect of antibiotics on susceptibility

rho_1

the test sensitivity in the absence of antibiotics

rho_2

the test sensitivity in the presence of antibiotics

phi

the importation probability

intervention_parameters

a dataframe with the intervention settings:

modfiy_transmission

if FALSE (default), transmission is not modified and the baseline value of beta is used. If set to a value, the transmission rate is the baseline transmission rate multiplied by the value.

decolonisation

if TRUE, detected patients are decolonised.

isolation

if TRUE, detected patients are isolated.

n_iter

the number of forward simulations.

seed

set a seed for reproducibility of the simulations.

Value

The function returns a list with three elements:

positive_tests

the number of positive tests in each simulation.

negative_tests

the number of negative tests in each simulation.

parameter_samples

the random samples from the chains that were used for the simulations.


mirjamlaager/mrsamcmc documentation built on May 20, 2020, 11:13 a.m.