View source: R/scenarios_return_previous_trajectory.R
scenario_return_previous_trajectory | R Documentation |
This scenario returns to the scenario_previous_trajectory
after the last
value of scenario_shock
.
scenario_return_previous_trajectory(
df,
dip_year = 2020,
recovery_year = 2022,
start_year = 2018,
end_year = 2025,
value_col = "value",
scenario_col = "scenario",
scenario_name = "return_previous_trajectory",
scenario_shock = "covid_shock",
scenario_previous_trajectory = "pre_covid_trajectory",
trim = TRUE,
small_is_best = FALSE,
keep_better_values = FALSE,
upper_limit = 100,
lower_limit = 0,
trim_years = TRUE,
start_year_trim = start_year,
end_year_trim = end_year,
source = sprintf("WHO DDI, %s", format(Sys.Date(), "%B %Y"))
)
df |
Data frame in long format, where 1 row corresponds to a specific country, year, and indicator. |
dip_year |
(integer) year where the dip appends |
recovery_year |
(integer) year from which the AROC will be applied |
start_year |
Base year for contribution calculation, defaults to 2018. |
end_year |
End year(s) for contribution calculation, defaults to 2019 to 2025. |
value_col |
Column name of column with indicator values. |
scenario_col |
(character) name of the column with the scenarios. |
scenario_name |
name of scenario |
scenario_shock |
(character) name of the scenario with the shock |
scenario_previous_trajectory |
(character) name of the scenario with the previous trajectories. |
trim |
logical to indicate if the data should be trimmed between
|
small_is_best |
Logical to identify if a lower value is better than a higher one (e.g. lower obesity in a positive public health outcome, so obesity rate should have small_is_best = TRUE). |
keep_better_values |
logical to indicate if "better" values should be
kept from |
upper_limit |
upper limit at which the indicator should be caped. |
lower_limit |
lower_limit limit at which the indicator should be caped. |
trim_years |
logical to indicate if years before |
start_year_trim |
(integer) year to start trimming from. |
end_year_trim |
(integer) year to end trimming. |
source |
Source to provide for calculated average service coverage and single measure. |
COVID scenarios
scenario_covid_delayed_return()
,
scenario_covid_never_return()
,
scenario_covid_rapid_return()
,
scenario_covid_sustained_disruption()
,
scenario_dip_recover()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.