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
- df
Data frame of model data
- col
Name of column to extrapolate/interpolate.
- group_col
Column name(s) of group(s) to use in
dplyr::group_by()
when supplying type, calculating mean absolute scaled error on data involving time series, and ifgroup_models
, then fitting and predicting models too. IfNULL
, not used. Defaults to"iso3"
.- sort_col
Column name(s) to use to
dplyr::arrange()
the data prior to supplying type and calculating mean absolute scaled error on data involving time series. IfNULL
, not used. Defaults to"year"
.- pred_col
Column name to store predicted value.
- sort_descending
Logical value on whether the sorted values from
sort_col
should be sorted in descending order. Defaults toFALSE
.- 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.
See also
General scenario functions
add_scenario()
,
calculate_aarc()
,
calculate_aroc()
,
exec_scenario()
,
fill_cols_scenario()
,
get_aarr()
,
get_baseline_value()
,
get_baseline_year()
,
get_last_value()
,
get_last_year_scenario()
,
get_latest_aarc()
,
get_percent_change_aarc()
,
get_target_aarc()
,
remove_unwanted_scenarios()
,
trim_values()
,
trim_years()