setinputs: Add or Replace Inputs in Models

setinputs.tfmR Documentation

Add or Replace Inputs in Models

Description

Adds new inputs to transfer function or univariate models.

Usage

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

setinputs(mdl, ...)

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

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.

Value

A tfm object.

See Also

um, tfm


tfarima documentation built on Nov. 5, 2025, 7:43 p.m.