<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ARIMA Transfer Functions in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/ARIMA-Transfer-Functions/m-p/394462#M2653</link>
    <description>&lt;P&gt;I wanted to post the code I ended up using so if others need it, too:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Abrupt permanent effect, zero-order transfer function */&lt;BR /&gt;proc arima data=arima;&lt;BR /&gt;identify var=logf(1) crosscorr=(perm);&lt;BR /&gt;estimate p=0 q=1 input=(perm);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Gradual permanent effect, first-order transfer function */&lt;BR /&gt;proc arima data=arima;&lt;BR /&gt;identify var=logf(1) crosscorr=(perm);&lt;BR /&gt;estimate p=0 q=1 input=( /(1) perm);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Abrupt temporary effect, pulse transfer function */&lt;BR /&gt;proc arima data=arima;&lt;BR /&gt;identify var=logf(1) crosscorr=(temp);&lt;BR /&gt;estimate p=0 q=1 input=( / (1) temp );&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Sat, 09 Sep 2017 18:39:47 GMT</pubDate>
    <dc:creator>KACJohnson</dc:creator>
    <dc:date>2017-09-09T18:39:47Z</dc:date>
    <item>
      <title>ARIMA Transfer Functions</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/ARIMA-Transfer-Functions/m-p/373420#M2488</link>
      <description>&lt;P&gt;Hello SAS Procedures Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like assistance with syntax for specifying "Zero-Order" and "First-Order" transfer functions for interrupted time series ARIMA models. Specifically, what is the code I would use for: (1) the abrupt, permanent change (zero-order), versus (2) gradual, permanent change (first-order)? I am trying to compare pulse, zero-order, and first-order functions to determine&amp;nbsp;if the introduction of a migration policy at point t (the year 2001) is characterized by a abrupt, temporary impact (pulse), an abrupt, permanent change (zero-order), or by a gradual, permanent change (first-order) on visa issuances.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also wonder if the way I have the dates set up is correct, respectively? (I.e. what would be the temporary shock from 2002 to 2007? Or a permanent change after 2001?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm very new to the ARIMA procedures and I have combed the SAS boards, guides, and examples for proper syntax. This is what I have come up with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pulse (temporary): where variable "temp" is coded as 0 prior to and after the event, and 1 during the temporary event ("000111000").&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data a;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;set a;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;temp = (date = '2002'd, '2003'd, '2004'd, '2005'd, '2006'd, '2007'd);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc arima data=a;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;identify var=f crosscorr=temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;estimate p=1 q=1 input=temp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;??? (permanent): where the variable "perm" is coded as 0 prior to the event (2001), and 1 after the event ("0000011111")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data a;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;set a;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;temp = (date &amp;gt;= '2002'd);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc arima data=a;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;identify var=f crosscorr=perm;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;estimate p =1 q=1 input=perm;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all for helping a newbie, I appreciate all the help and feedback.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 19:27:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/ARIMA-Transfer-Functions/m-p/373420#M2488</guid>
      <dc:creator>KACJohnson</dc:creator>
      <dc:date>2017-07-05T19:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: ARIMA Transfer Functions</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/ARIMA-Transfer-Functions/m-p/374089#M2489</link>
      <description>&lt;P&gt;Hi KACJohnson,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are definitely on the right track in terms of your understanding of abrupt temporary changes, as compared with abrupt permanent changes and gradual permanent changes.&amp;nbsp; Temporary changes are typically modeled using a pulse intervention variable, whereas permanent effects are typically modeled using a step intervention variable.&amp;nbsp; A pulse intervention takes on the value of 0 before and after the intervention, and 1&amp;nbsp;for the duration of the intervention.&amp;nbsp; A step intervention typically takes on the value of 0 before the intervention and 1 afterwards.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An abrupt temporary effect can be modeled by including&amp;nbsp;a pulse intervention variable as a simple&amp;nbsp;regressor&amp;nbsp;in the model.&amp;nbsp; Similarly, an abrupt permanent effect can be modeled by including a step intervention variable as a simple regressor in the model.&amp;nbsp; A gradual permanent effect can be modeled by including a step intervention variable as a dynamic regressor with a denominator factor in the transfer function part of the model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Following, please find an example that illustrates how to fit these 3 types of intervention models.&amp;nbsp; The example contains&amp;nbsp;annual data from 1998-2010.&amp;nbsp;&amp;nbsp;Three additional years are included to illustrate how to use the models for forecasting.&amp;nbsp; The example creates a SAS date variable, DATE, from the&amp;nbsp;numeric YEAR variable, and then uses the&amp;nbsp;DATE variable to create the pulse and step intervention variables&amp;nbsp;included in the subsequent ARIMA models.&amp;nbsp;&amp;nbsp;I tried to keep these variables consistent with the description you provided for your analysis.&amp;nbsp;&amp;nbsp; Please note that in order to&amp;nbsp;illustrate the impact of the intervention variables in this example, I have not&amp;nbsp;specified any AR or MA terms in the ARIMA models, though you can certainly include the P= and/or Q= options in the ESTIMATE statement to model any residual autocorrelation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
  input year y;
  date=mdy(1,1,year);  /*  create SAS date variable from YEAR variable */
  format date year4.;
  datalines;
1998 10
1999 12
2000 12
2001 15
2002 16
2003 16
2004 17
2005 17
2006 17
2007 16
2008 17
2009 18
2010 17
2011 .
2012 .
2013 .
;

  /*  add step and pulse interventions to data set using DATE variable */
data a;
  set a;
  perm=(date &amp;gt;= '01jan2001'd);
  temp=('01jan2002'd &amp;lt;= date &amp;lt;= '01jan2007'd);
run;

proc print data=a;
run;

 /* abrupt temporary effect */
proc arima data=a plots=(forecast(forecast));
  identify var=y crosscorr=(temp);
  estimate input=(temp);
  forecast out=out1 lead=3 id=date interval=year;
run;
quit;

 /*  abrupt permanent effect */
proc arima data=a plots=(forecast(forecast));
  identify var=y crosscorr=(perm);
  estimate input=(perm);
  forecast out=out2 lead=3 id=date interval=year;
run;
quit;

 /*  gradual permanent effect */
proc arima data=a plots=(forecast(forecast));
  identify var=y crosscorr=(perm);
  estimate input=( /(1) perm);
  forecast out=out3 lead=3 id=date interval=year;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that when creating the intervention variables based on the values of the SAS date variable, DATE, you must use a SAS date literal of the form 'ddmonyy'd.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more details on how to specify input variables and transfer function models in PROC ARIMA, please see the following section of the documentation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/etsug/68148/HTML/default/viewer.htm#etsug_arima_details24.htm" target="_self"&gt;http://support.sas.com/documentation/cdl/en/etsug/68148/HTML/default/viewer.htm#etsug_arima_details24.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this information helps!&lt;/P&gt;
&lt;P&gt;DW&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2017 20:06:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/ARIMA-Transfer-Functions/m-p/374089#M2489</guid>
      <dc:creator>dw_sas</dc:creator>
      <dc:date>2017-07-07T20:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: ARIMA Transfer Functions</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/ARIMA-Transfer-Functions/m-p/394462#M2653</link>
      <description>&lt;P&gt;I wanted to post the code I ended up using so if others need it, too:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Abrupt permanent effect, zero-order transfer function */&lt;BR /&gt;proc arima data=arima;&lt;BR /&gt;identify var=logf(1) crosscorr=(perm);&lt;BR /&gt;estimate p=0 q=1 input=(perm);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Gradual permanent effect, first-order transfer function */&lt;BR /&gt;proc arima data=arima;&lt;BR /&gt;identify var=logf(1) crosscorr=(perm);&lt;BR /&gt;estimate p=0 q=1 input=( /(1) perm);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Abrupt temporary effect, pulse transfer function */&lt;BR /&gt;proc arima data=arima;&lt;BR /&gt;identify var=logf(1) crosscorr=(temp);&lt;BR /&gt;estimate p=0 q=1 input=( / (1) temp );&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2017 18:39:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/ARIMA-Transfer-Functions/m-p/394462#M2653</guid>
      <dc:creator>KACJohnson</dc:creator>
      <dc:date>2017-09-09T18:39:47Z</dc:date>
    </item>
  </channel>
</rss>

