<?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: how to run ARMA(p, q) model with controls in PROC ARIMA in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/how-to-run-ARMA-p-q-model-with-controls-in-PROC-ARIMA/m-p/658244#M3863</link>
    <description>&lt;P&gt;That's very helpful, thanks a lot!&lt;/P&gt;</description>
    <pubDate>Sat, 13 Jun 2020 04:25:34 GMT</pubDate>
    <dc:creator>JacAder</dc:creator>
    <dc:date>2020-06-13T04:25:34Z</dc:date>
    <item>
      <title>how to run ARMA(p, q) model with controls in PROC ARIMA</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/how-to-run-ARMA-p-q-model-with-controls-in-PROC-ARIMA/m-p/651013#M3841</link>
      <description>&lt;P&gt;Dear SAS community, I would like to:&lt;BR /&gt;1) run ARMA (1,2) model for "change in sale", with control variables price and income:&lt;BR /&gt;change in sale = f(price, income, lag1 of change in sale, lag1 error, lag2 error, error term)&lt;/P&gt;&lt;P&gt;2) plot the residuals.&lt;/P&gt;&lt;P&gt;3) save the output, including original data, parameters and residuals.&lt;/P&gt;&lt;P&gt;It is something like the following, could you kindly help to correct? Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc arima data=have;
identify var=sales(1) crosscorr=(price income) noprint;
estimate input=(price income) plot;
run;
estimate p=1 q=2 input=(price income) outest=arma_sale;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 May 2020 08:35:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/how-to-run-ARMA-p-q-model-with-controls-in-PROC-ARIMA/m-p/651013#M3841</guid>
      <dc:creator>JacAder</dc:creator>
      <dc:date>2020-05-27T08:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to run ARMA(p, q) model with controls in PROC ARIMA</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/how-to-run-ARMA-p-q-model-with-controls-in-PROC-ARIMA/m-p/652363#M3849</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/163151"&gt;@JacAder&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC ARIMA can be used to fit a regression model with ARMA errors, as shown in the link below:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/?docsetId=etsug&amp;amp;docsetTarget=etsug_arima_gettingstarted25.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en#etsug_arima001029" target="_self"&gt;https://go.documentation.sas.com/?docsetId=etsug&amp;amp;docsetTarget=etsug_arima_gettingstarted25.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en#etsug_arima001029&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, if you want to fit the model:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"change in sale = f(price, income, lag1 of change in sale, lag1 error, lag2 error, error term)"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;then you can use other SAS procedures, such as PROC UCM or PROC VARMAX.&amp;nbsp; For your desired model, PROC VARMAX provides the most straightforward approach.&amp;nbsp; Your model, residual plot, and saved output can be obtained with the following code.&amp;nbsp; Note:&amp;nbsp; Although PROC VARMAX supports an OUTEST= data set, the code below illustrates how to output the ParameterEstimates table via an ODS OUTPUT statement.&amp;nbsp; It saves the parameter estimates table in a different format than the OUTEST= data set.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc varmax data=have plots=(model residual); 
  ods output ParameterEstimates=arma_est;
  id date interval=month;
  model sales = price income / p=1 q=2 dify(1);* difx(1);
  output out=out lead=0; 
run;

proc print data=arma_est;
run;

data all_varmax;
  merge have out;
  by date;
run;

proc print data=all_varmax;
  var date sales price income for1 res1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;When the response variable is differenced, it is common to apply the same order of differencing to the input variables as well.&amp;nbsp; I included the DIFX option in the MODEL statement to illustrate how to difference the input variables, but commented it out, since that was not used in your model description.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For more details on the mathematical models fit by the ARIMA and VARMAX procedures, please see the following links:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ARIMA:&amp;nbsp;&amp;nbsp;&lt;A href="https://go.documentation.sas.com/?docsetId=etsug&amp;amp;docsetTarget=etsug_arima_gettingstarted13.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;https://go.documentation.sas.com/?docsetId=etsug&amp;amp;docsetTarget=etsug_arima_gettingstarted13.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;VARMAX:&amp;nbsp; &lt;A href="https://go.documentation.sas.com/?docsetId=etsug&amp;amp;docsetTarget=etsug_varmax_details02.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en"&gt;https://go.documentation.sas.com/?docsetId=etsug&amp;amp;docsetTarget=etsug_varmax_details02.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I hope this helps!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;DW&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 20:19:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/how-to-run-ARMA-p-q-model-with-controls-in-PROC-ARIMA/m-p/652363#M3849</guid>
      <dc:creator>dw_sas</dc:creator>
      <dc:date>2020-06-01T20:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to run ARMA(p, q) model with controls in PROC ARIMA</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/how-to-run-ARMA-p-q-model-with-controls-in-PROC-ARIMA/m-p/658244#M3863</link>
      <description>&lt;P&gt;That's very helpful, thanks a lot!&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jun 2020 04:25:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/how-to-run-ARMA-p-q-model-with-controls-in-PROC-ARIMA/m-p/658244#M3863</guid>
      <dc:creator>JacAder</dc:creator>
      <dc:date>2020-06-13T04:25:34Z</dc:date>
    </item>
  </channel>
</rss>

