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 tort_opts()
. Set toNULL
to switch to using back calculation rather than generating infections using Rt.- breakpoints
An integer vector (binary) indicating the location of breakpoints.
- delay
Numeric mean delay
- horizon
Numeric, forecast horizon.
Examples
# default Rt data
create_rt_data()
#> $r_mean
#> [1] 1
#>
#> $r_sd
#> [1] 1
#>
#> $estimate_r
#> [1] 1
#>
#> $bp_n
#> [1] 0
#>
#> $breakpoints
#> NULL
#>
#> $future_fixed
#> [1] 1
#>
#> $fixed_from
#> [1] 0
#>
#> $pop
#> [1] 0
#>
#> $stationary
#> [1] 0
#>
#> $future_time
#> [1] 0
#>
# settings when no Rt is desired
create_rt_data(rt = NULL)
#> $r_mean
#> [1] 1
#>
#> $r_sd
#> [1] 1
#>
#> $estimate_r
#> [1] 0
#>
#> $bp_n
#> [1] 0
#>
#> $breakpoints
#> NULL
#>
#> $future_fixed
#> [1] 0
#>
#> $fixed_from
#> [1] 0
#>
#> $pop
#> [1] 0
#>
#> $stationary
#> [1] 1
#>
#> $future_time
#> [1] 0
#>
# using breakpoints
create_rt_data(rt_opts(use_breakpoints = TRUE), breakpoints = rep(1, 10))
#> $r_mean
#> [1] 1
#>
#> $r_sd
#> [1] 1
#>
#> $estimate_r
#> [1] 1
#>
#> $bp_n
#> [1] 10
#>
#> $breakpoints
#> [1] 1 1 1 1 1 1 1 1 1 1
#>
#> $future_fixed
#> [1] 1
#>
#> $fixed_from
#> [1] 0
#>
#> $pop
#> [1] 0
#>
#> $stationary
#> [1] 0
#>
#> $future_time
#> [1] 0
#>