% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils-scenarios.R
\name{flat_extrapolation}
\alias{flat_extrapolation}
\title{Flat extrapolation}
\usage{
flat_extrapolation(
  df,
  col,
  group_col = NULL,
  sort_col = "year",
  pred_col = "pred",
  sort_descending = FALSE,
  replace_obs = c("missing", "none")
)
}
\arguments{
\item{df}{Data frame of model data}

\item{col}{Name of column to extrapolate/interpolate.}

\item{group_col}{Column name(s) of group(s) to use in \code{\link[dplyr:group_by]{dplyr::group_by()}} when
supplying type, calculating mean absolute scaled error on data involving
time series, and if \code{group_models}, then fitting and predicting models too.
If \code{NULL}, not used. Defaults to \code{"iso3"}.}

\item{sort_col}{Column name(s) to use to \code{\link[dplyr:arrange]{dplyr::arrange()}} the data prior to
supplying type and calculating mean absolute scaled error on data involving
time series. If \code{NULL}, not used. Defaults to \code{"year"}.}

\item{pred_col}{Column name to store predicted value.}

\item{sort_descending}{Logical value on whether the sorted values from \code{sort_col}
should be sorted in descending order. Defaults to \code{FALSE}.}

\item{replace_obs}{Character value specifying how, if at all, observations should
be replaced by fitted values. Defaults to replacing only missing values,
but can be used to replace all values or none.}
}
\value{
a data frame with predicted data,
}
\description{
Flat extrapolation
}
\seealso{
General scenario functions
\code{\link{add_scenario}()},
\code{\link{calculate_aarc}()},
\code{\link{calculate_aroc}()},
\code{\link{exec_scenario}()},
\code{\link{fill_cols_scenario}()},
\code{\link{get_aarr}()},
\code{\link{get_baseline_value}()},
\code{\link{get_baseline_year}()},
\code{\link{get_last_value}()},
\code{\link{get_last_year_scenario}()},
\code{\link{get_latest_aarc}()},
\code{\link{get_percent_change_aarc}()},
\code{\link{get_target_aarc}()},
\code{\link{remove_unwanted_scenarios}()},
\code{\link{trim_values}()},
\code{\link{trim_years}()}
}
\concept{scenarios}
\keyword{internal}
