RATS 10.1
RATS 10.1

Instructions /

TRFUNCTION Instruction

Home Page

← Previous Next →

TRFUNCTION( options )  cseries start end

TRFUNCTION computes the transfer function of the lag polynomial which is implied by an equation. Unfortunately, the phrase “transfer function” is used in time series analysis in two different ways. If you are interested in a Box-Jenkins transfer function model, please see the instruction BOXJENK.

Parameters

cseries

Complex series for the computed transfer function.

start, end

range of entries to be computed (default 1 to the FREQUENCY length)

Option

EQUATION=equation[no default value—you must specify this]

The equation for which you want to compute the transfer function

Description

The equation must have one of the forms:

 

\({y_t} = A\left( L \right){\kern 1pt} {y_t}\)

univariate autoregression

\({y_t} = A\left( L \right){\kern 1pt} {y_t} + B\left( L \right){\kern 1pt} {u_t}\)

univariate ARMA

\({y_t} = C\left( L \right){\kern 1pt} {x_t}\)

univariate distributed lag

\({y_t} = C\left( L \right){\kern 1pt} {x_t} + B\left( L \right){\kern 1pt} {u_t}\)

univariate distributed lag with MA error

\({y_t} = B\left( L \right){\kern 1pt} {u_t}\)

MA process

 

In all of these, the variable CONSTANT may be among the right side variables.

 

TRFUNC computes the transfer function by:

 

Taking the Fourier transform of the lag polynomial \(1 - A\left( L \right)\) or \(C\left( L \right)\)

Dividing that by the Fourier transform of the moving average part \(B\left( L \right)\), if it is present.

Notes

If you are filtering in the frequency domain and are using a transfer function, remember that CMULTIPLY conjugates the second series as does the * operation in an expression such as CSET.

 

For simple transfer functions, particularly those with known coefficients, you might find it easier to use the function %ZLAG to construct the transfer function directly using CSET.

Examples

linreg(define=dlag)  ipd

# constant m1{0 to 8}

frequency 1 512

trfunc(equation=dlag) 1

cmult 1 1

 

estimates a distributed lag, computes the frequency domain transfer function (into complex series 1), then squares that to give the squared gain from M1 to IPD.


 

equation(noconstant,coeffs=||.9,.3||) arma y 1 1               

trfunc(equation=arma) 1

 

defines  \({y_t} = 0.9{y_{t - 1}} + {u_t} + 0.3{u_{t - 1}}\) and computes its transfer function.


 

The same transfer function as this last example can be created using the following CSET instruction.

 

cset 1 = (1-.9*%zlag(t,1))/(1+.3*%zlag(t,1))

 


Copyright © 2025 Thomas A. Doan