Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Forecasting
- /
- proc arima transfer funtion

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 07-25-2014 10:58 AM
(1168 views)

Hello,

I have moderate background in time series analysis. I'm trying to do an intervention modeling using proc arima.

The model that I have postulated is an gradual permanent change such as shown below. See below for an example code. The problem that I'm facing is when I'm visualizing using ratio function using iml, I'm not able to get the appropriate effect. Any help in representing the gradual permanent change using transfer function in proc arima as well as visualizing using ratio function in proc arima would be greatly appreciated.

********************************************************************************************************************;

** Input Raw Data **;

********************************************************************************************************************;

data temp;

input cd @@;

datalines;

0 0 0 0 0 0.1 0.3 0.5

0.6 0.7 0.75 0.78 0.79 0.8

0.805 0.806 0.807 0.808 0.808

0.808 0.808

;

run;

********************************************************************************************************************;

** Create an indicator flag for Intervention **;

data temp;

set temp;

if _n_ > 5 then step = 1;

else step = 0;

run;

*****************************************************************************************************************;

** Identify the transfer function using cross correlation plot. **;

ods graphics on;

proc arima data=temp plots=all;

identify var=cd crosscorr = (step); /*Identify Transfer Function by CCF*/

estimate input = (/(1)step) method = ml outest = mm1; /*Estimate Model using Transfer Function Gradual Permanent Change*/

run;

ods graphics off;

** Extract Intervention for plotting **;

%let NUMLIST = 0.22;

%let DENLIST = -0.74;

%let nlags = 40;

proc iml;

Phi={&NUMLIST};

Theta={1 &DENLIST};

Psi=ratio(Theta,Phi,&NLAGS);

numLag=&NLAGS;

Lag=1:numLag;

Psi=Psi[1,1:numLag];

Y=Lag`||Psi`;

oname={'Lag' 'Psi'};

create temptransfer from Y[colname=oname];

append from Y;

close temptransfer;

run;

ods graphics on;

proc sgplot data=temptransfer;

vbar Lag / Response=Psi Stat=sum;

refline 0 / axis=y;

run;

ods graphics off;

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi.

You have created the effect correctly using you data step. This is seen by adding the following statement after the ESTIMATE statement and before the RUN in PROC ARIMA; FORECAST lead=0 printall;

As the forecast plot shows, your estimated a transfer function that generates a gradual build to a new status quo.

The IML portion of the code is outputting a data set that represents only the initial impact of the step and associated decay. That is, it is only capturing the effect of the first 1 in the step dummy. My IML is rusty, but the idea (and a brute forece way) would be to increment time; 1, 2, 3, 4, .... and then add effects corresponding to each interval and previous intervals. For example, looking at the Psi plot generated by your code, the effect, under a step intervention, at time 2 would by the effect at lag 2 + effect at lag 1. Effect at lag 3 = effect at lags 3 + 2 + 1. And so on.

Feel free to follow up and discuss details. My email is chip.wells@sas.com

2 REPLIES 2

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi.

You have created the effect correctly using you data step. This is seen by adding the following statement after the ESTIMATE statement and before the RUN in PROC ARIMA; FORECAST lead=0 printall;

As the forecast plot shows, your estimated a transfer function that generates a gradual build to a new status quo.

The IML portion of the code is outputting a data set that represents only the initial impact of the step and associated decay. That is, it is only capturing the effect of the first 1 in the step dummy. My IML is rusty, but the idea (and a brute forece way) would be to increment time; 1, 2, 3, 4, .... and then add effects corresponding to each interval and previous intervals. For example, looking at the Psi plot generated by your code, the effect, under a step intervention, at time 2 would by the effect at lag 2 + effect at lag 1. Effect at lag 3 = effect at lags 3 + 2 + 1. And so on.

Feel free to follow up and discuss details. My email is chip.wells@sas.com

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank You very much.

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

**If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. **

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.