replace_flat_fits: Replace fits in years where they are flat with fits from...

View source: R/replace_flat_fits.R

replace_flat_fitsR Documentation

Replace fits in years where they are flat with fits from other years

Description

This function considers fits with a slope less than defined in threshold flat and tries to replace them with non-flat fits from other years.

Usage

replace_flat_fits(
  path_to_postfit_rdata,
  flat = NULL,
  threshold = 0.01,
  plot = FALSE
)

Arguments

path_to_postfit_rdata

Path to the Rdata file that contains raw data, fitted data and fitcoefficients saved by the emulator function

flat

If you want this function to replace further fits provide their region and year here using a vector of the form c("LAM:2020,2025", "IND:2005")

threshold

Defines the value of the slope (b) below which fits are considered flat

plot

logical. If TRUE supply curves will be saved to png files

Author(s)

David Klein

See Also

emulator fill_missing_years


pik-piam/remulator documentation built on Oct. 19, 2023, 4:07 p.m.