The default methods for impute_errors are na.approx, na.interp, na_interpolation, na.locf, and na_mean. See the help file for each for additional documentation. Additional arguments for the imputation functions are passed as a list of lists to the addl_arg argument, where the list contains one to many elements that are named by the methods. The elements of the master list are lists with arguments for the relevant methods. See the examples.
A user-supplied function can also be passed to methods as an additional imputation method. A character string indicating the path of the function must also be supplied to methodPath. The path must point to a function where the first argument is the time series to impute.
An alternative error function can also be passed to errorParameter if errorPath is not NULL. The function specified in errorPath must have two arguments where the first is a vector for the observed time series and the second is a vector for the predicted time series.
The smps argument indicates the type of sampling for generating missing data. Options are smps = 'mcar' for missing completely at random and smps = 'mar' for missing at random. Additional information about the sampling method is described in sample_dat. The relevant arguments for smps = 'mar' are blck and blckper which greatly affect the sampling method.
Infinite comparisons are removed with a warning if errorParameter = 'mape'. This occurs if any of the observed values in the original time series are zero. Error estimates for such datasets are evaluated only for non-zero observations.