% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scenarios_return_previous_trajectory.R
\name{scenario_return_previous_trajectory}
\alias{scenario_return_previous_trajectory}
\title{Scenario return to previpus trajectory}
\usage{
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"))
)
}
\arguments{
\item{df}{Data frame in long format, where 1 row corresponds to a specific
country, year, and indicator.}

\item{dip_year}{(integer) year where the dip appends}

\item{recovery_year}{(integer) year from which the AROC will be applied}

\item{start_year}{Base year for contribution calculation, defaults to 2018.}

\item{end_year}{End year(s) for contribution calculation, defaults to 2019 to 2025.}

\item{value_col}{Column name of column with indicator values.}

\item{scenario_col}{(character) name of the column with the scenarios.}

\item{scenario_name}{name of scenario}

\item{scenario_shock}{(character) name of the scenario with the shock}

\item{scenario_previous_trajectory}{(character) name of the scenario with the previous trajectories.}

\item{trim}{logical to indicate if the data should be trimmed between
\code{upper_limit} and \code{lower_limit}.}

\item{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).}

\item{keep_better_values}{logical to indicate if "better" values should be
kept from \code{value_col} if they are present. Follows the direction set in
\code{small_is_best}.  For instance, if small_is_best is TRUE, then \code{value_col} lower
than \code{col} will be kept.}

\item{upper_limit}{upper limit at which the indicator should be caped.}

\item{lower_limit}{lower_limit limit at which the indicator should be caped.}

\item{trim_years}{logical to indicate if years before \code{start_year_trim} and after
\code{end_year_trim} should be removed}

\item{start_year_trim}{(integer) year to start trimming from.}

\item{end_year_trim}{(integer) year to end trimming.}

\item{source}{Source to provide for calculated average service coverage and
single measure.}
}
\description{
This scenario returns to the \code{scenario_previous_trajectory} after the last
value of \code{scenario_shock}.
}
\seealso{
COVID scenarios
\code{\link{scenario_covid_delayed_return}()},
\code{\link{scenario_covid_never_return}()},
\code{\link{scenario_covid_rapid_return}()},
\code{\link{scenario_covid_sustained_disruption}()},
\code{\link{scenario_dip_recover}()}
}
\concept{scenario_covid}
\keyword{internal}
