create_rt_data: Create Time-varying Reproduction Number Data

create_rt_dataR Documentation

Create Time-varying Reproduction Number Data

Description

[Stable] Takes the output from rt_opts() and converts it into a list understood by stan.

Usage

create_rt_data(rt = rt_opts(), breakpoints = NULL, delay = 0, horizon = 0)

Arguments

rt

A list of options as generated by rt_opts() defining Rt estimation. Defaults to rt_opts(). To generate new infections using the non-mechanistic model instead of the renewal equation model, use rt = NULL. The non-mechanistic model internally uses the setting rt = rt_opts(use_rt = FALSE, future = "project", gp_on = "R0").

breakpoints

An integer vector (binary) indicating the location of breakpoints.

delay

Numeric mean delay

horizon

Numeric, forecast horizon.

Value

A list of settings defining the time-varying reproduction number

See Also

rt_settings

Examples

## Not run: 
# default Rt data
create_rt_data()

# settings when no Rt is desired
create_rt_data(rt = NULL)

# using breakpoints
create_rt_data(rt_opts(use_breakpoints = TRUE), breakpoints = rep(1, 10))

# using random walk
create_rt_data(rt_opts(rw = 7), breakpoints = rep(1, 10))

## End(Not run)

epiforecasts/EpiNow2 documentation built on Dec. 10, 2024, 5:32 p.m.