intervention_dates_for_odin: Prepare intervention timing for odin

View source: R/particle.R

intervention_dates_for_odinR Documentation

Prepare intervention timing for odin

Description

Prepare dates of intervention for use with odin. This function exists to make explicit how time changes through the model relative to the data and to odin's internal clock.

Usage

intervention_dates_for_odin(
  dates,
  change,
  start_date,
  steps_per_day,
  starting_change = 1
)

Arguments

dates

Dates (or ISO-formatted strings for conversion with as.Date at which intervention changes.

change

Variable that is changing at each of dates.

start_date

The date to start the simulation from..

steps_per_day

The number of steps per day

starting_change

The first value to use for change in the case that all provided dates are after start_date

Details

If start date is after elements in dates, these will be trimmed accordinly and the final change value used as the value one day after start date.


mrc-ide/squire documentation built on Sept. 10, 2022, 1:11 a.m.