[R] Transfer Function Modeling

Richard A. Bilonick rab at nauticom.net
Wed Mar 5 17:09:09 CET 2003

I want to forecast a time series Y using a model that includes previous 
values of Y and an exogenous time series X using a transfer function. 
The standard procedure as described in Box and Jenkins and numerous 
other references is to first fit an ARIMA model to X. Use the ARIMA 
model to computer residuals for X and then apply the same ARIMA function 
to Y to compute residuals for Y. The cross correlation between these two 
sets of residuals then should allow discovery of the structure of the 
transfer function that relates X to Y. How can I do this in R? I know 
how to use the ts package to fit ARIMA models. Is it possible to use the 
"filter" function from the ts package to help compute the proper 
residuals for Y? I've read (and reread) the help file on "filter" and 
tried to apply it but I must be missing something. How can I use 
"filter" to handle both the AR and MA components? Or am I on the wrong 

Rick B.

More information about the R-help mailing list