Skip to contents

Add the estimated fitted values back to the original

Usage

add_to_original_data(
  clean_data,
  isat_object,
  dep_var_basename = "imports_of_goods_and_services",
  ardl_or_ecm = "ardl"
)

Arguments

clean_data

An input data.frame or tibble. Must be the output of clean_data() to fit all requirements.

isat_object

An object of class 'isat'. Most likely should be the 'best_model' element that is returned by the 'estimate_module()' function.

dep_var_basename

A character string of the name of the dependent variable as contained in clean_data() in a level form (i.e. no ln or D in front of the name).

ardl_or_ecm

Either 'ardl' or 'ecm' to determine whether to estimate the model as an Autoregressive Distributed Lag Function (ardl) or as an Equilibrium Correction Model (ecm).

Value

A tibble with the fitted values as one column.