two_pass_signal_filter: Forward and reverse pass filter to correct phase shift...

Description Usage Arguments

Description

Forward and reverse pass filter to correct phase shift introduced by one-pass filter. Uses signal::filter to do each filtering pass. Closely based on signal::filtfilt – see the documentation there for further discussion. Two main differences with that implementation: 1) We impute internal missing values for the purposes of filtering, then replace them with NAs again after filtering 2) We pad the end of the time series with the last observed value instead of zeros. Based on very informal plotting, this seems to give better values at the end of the time series, which will be important for prediction

Usage

1
two_pass_signal_filter(filt, x, impute_fn)

Arguments

x

vector of data to be filtered

filter

vector of filter coefficients for a FIR filter

method

method for a call to stats::filter – see the documentation at stats::filter

sides

sides for a call to stats::filter – see the documentation at stats::filter

circular

circular for a call to stats::filter – see the documentation at stats::filter


reichlab/kcde documentation built on May 27, 2019, 4:53 a.m.