predict.transfer: Predict using an estimated frequency-domain transfer function

Description Usage Arguments Details Value

Description

Using output from the tf function, and an input (multivariate) time series, this function generates predicted values.

Usage

1
2
3
## S3 method for class 'transfer'
predict(object, newdata, filterMod = trim, sides = 2,
  returnInternals = FALSE, ...)

Arguments

object

An object of class transfer, from a call to the tf function.

newdata

A data.frame whose columns are the time domain input series.

filterMod

A function to be applied to the filter coefficients before convolution. Defaults to trim.

sides

Argument to filter: sides = 1 is for filter coefficients that apply to past values only (a causal filter); sides = 2 is for filter coefficients centered aroung lag 0.

returnInternals

whether to return things computed during the prediction. Currently, this returns the full vector(s) of filter coefficients as an attribute.

...

additional arguments passed to filterMod.

Details

The transfer function estimate is used to calculate filter coefficients to be applied in the time domain via convolution with the input series newdata. Prior to the convolution, the filter coefficients can be modified using the filterMod function. If filterMod produces a causal filter, ensure that sides = 1; in any case, be sure that the output of filterMod conforms to the requirements of filter.

The filter coefficients are put into vectors in the orientation expected by filter. If N is the total length of a block, the causal coefficients from lag = 0 to lag = (N-1)/2 are placed on the "right", and the non-causal coefficients from lag = -(N-1)/(2) to lag = -1 are placed on the "left". This means that for a causal filter, you would exclude filter coefficients with an index less than N/2, because there are an odd number of coefficients, with lag = 0 in the middle, and an equal number of coefficients on each side of zero.

Value

A data.frame with the predicted values obtained by filtering the input series newdata.


driegert/transfer documentation built on May 15, 2019, 2:11 p.m.