Learn R Programming

tfarima (version 0.4.1)

setinputs.tfm: Add or Replace Inputs in Models

Description

Adds new inputs to transfer function or univariate models.

Usage

# S3 method for tfm
setinputs(
  mdl,
  xreg = NULL,
  inputs = NULL,
  y = NULL,
  envir = parent.frame(),
  ...
)

setinputs(mdl, ...)

# S3 method for um setinputs(mdl, xreg = NULL, inputs = NULL, y = NULL, envir = NULL, ...)

Value

A tfm object.

Arguments

mdl

A um or tfm object.

xreg

Optional matrix of exogenous regressors.

inputs

Optional list of tf objects (only for tfm).

y

Optional ts object for output series.

envir

Environment for evaluation. Default is calling environment.

...

Additional arguments passed to model constructor.

Details

For tfm objects: If the model already has inputs of the same type, new ones are appended (combined). The model is re-fitted by default unless fit = FALSE.

See Also

um, tfm