<?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: Proc VARMAX - getting an explicit model equation in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-VARMAX-getting-an-explicit-model-equation/m-p/986361#M5048</link>
    <description>&lt;P&gt;Thank you! What I am still not clear on is if this will be an equation&amp;nbsp;&lt;SPAN&gt;that allows for&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG data-path-to-node="2,0" data-index-in-node="88"&gt;manual implementation&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;outside of SAS. I.e., that the estimated coefficients can be used in external environments to generate forecasts by simply plugging in predictor values. I am not clear from your answer if it is a yes to this question. Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Apr 2026 06:17:53 GMT</pubDate>
    <dc:creator>Taliah</dc:creator>
    <dc:date>2026-04-15T06:17:53Z</dc:date>
    <item>
      <title>Proc VARMAX - getting an explicit model equation</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-VARMAX-getting-an-explicit-model-equation/m-p/986204#M5045</link>
      <description>&lt;P&gt;We are implementing a &lt;STRONG data-index-in-node="22" data-path-to-node="1"&gt;VARX (Vector Autoregression with Exogenous variables)&lt;/STRONG&gt; model using &lt;STRONG data-index-in-node="88" data-path-to-node="1"&gt;PROC VARMAX&lt;/STRONG&gt; in SAS to forecast Loan Loss Provisions (LLP) based on macro financial variables. A critical requirement is that we can give an &lt;STRONG data-index-in-node="48" data-path-to-node="2,0"&gt;explicit model equation&lt;/STRONG&gt; that allows for &lt;STRONG data-index-in-node="88" data-path-to-node="2,0"&gt;manual implementation&lt;/STRONG&gt; outside of SAS. I.e., that the estimated coefficients can be used in external environments to generate forecasts by simply plugging in predictor values. As I am still learning this model, can someone with experience in this model tell me if it is possible to get such an explicit model equation from SAS using proc varmax (or otherwise)? Thank you!&lt;/P&gt;</description>
      <pubDate>Sun, 12 Apr 2026 07:38:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-VARMAX-getting-an-explicit-model-equation/m-p/986204#M5045</guid>
      <dc:creator>Taliah</dc:creator>
      <dc:date>2026-04-12T07:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Proc VARMAX - getting an explicit model equation</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-VARMAX-getting-an-explicit-model-equation/m-p/986345#M5047</link>
      <description>&lt;P&gt;VARX(&lt;EM&gt;p,s&lt;/EM&gt;) model equation is discussed here in the PROC VARMAX documentation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/v_073/etsug/etsug_varmax_details23.htm#etsug_varmax011855" target="_blank"&gt;SAS Help Center: VAR and VARX Modeling&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For a simple example of VARX(1,0) model with two dependent variables y1 and y2, one exogenous variable x, the model equations for y1 and y2 can be written like below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;y1_t&amp;nbsp; = CONST1 + XL0_1_1*x_t +AR1_1_1*y1_t-1 + AR1_1_2*y2_t-1 + epsilon1_t&lt;/P&gt;
&lt;P&gt;y2_t = CONST2 +&amp;nbsp;XL0_2_1*x_t +AR1_2_1*y1_t-1 + AR1_2_2*y2_t-1 + epsilon2_t;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2026 16:58:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-VARMAX-getting-an-explicit-model-equation/m-p/986345#M5047</guid>
      <dc:creator>SASCom1</dc:creator>
      <dc:date>2026-04-14T16:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Proc VARMAX - getting an explicit model equation</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-VARMAX-getting-an-explicit-model-equation/m-p/986361#M5048</link>
      <description>&lt;P&gt;Thank you! What I am still not clear on is if this will be an equation&amp;nbsp;&lt;SPAN&gt;that allows for&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG data-path-to-node="2,0" data-index-in-node="88"&gt;manual implementation&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;outside of SAS. I.e., that the estimated coefficients can be used in external environments to generate forecasts by simply plugging in predictor values. I am not clear from your answer if it is a yes to this question. Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2026 06:17:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-VARMAX-getting-an-explicit-model-equation/m-p/986361#M5048</guid>
      <dc:creator>Taliah</dc:creator>
      <dc:date>2026-04-15T06:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Proc VARMAX - getting an explicit model equation</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-VARMAX-getting-an-explicit-model-equation/m-p/986369#M5049</link>
      <description>&lt;P&gt;In the MODEL statement of your PROC VARMAX, you need to include these options (after a forward slash):&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;print=(dynamic)&amp;nbsp;printform=univariate;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The best portion of the printed output to look at in order to write down the equation(s) is the final table in the printed output.&amp;nbsp; The ODS table name for this table (found by including an ODS TRACE ON / LISTING; statement with your PROC VARMAX step) is the DynamicParameterEstimates table.&amp;nbsp;&amp;nbsp;In the printed output, this table is labeled, "Dynamic Model Parameter Estimates".&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This table provides the equation, the parameter estimate and the variable associated with that parameter estimate.&amp;nbsp;&amp;nbsp;Using this information, you can write down the model equation.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;&lt;SPAN&gt;prediction equations allow you to&amp;nbsp;hand-calculate the predicted values (or have it done by&amp;nbsp;Excel / Python / ...).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But ... as I write this, I do have my doubts. You’ll find various questions (topics) in these communities about ARIMAX models created using PROC ARIMA. In every of these topic-threads, the answer is that it’s incredibly complicated (if not impossible) to transfer prediction equations to Excel (for example). I suspect it won’t be any different for Multivariate ARIMA. You can, of course, give it a go.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Just do it in SAS (as a benchmark) and compare with doing it outside SAS.&lt;BR /&gt;In SAS&amp;nbsp; ... if you want to score a completely new data set using parameters estimated in PROC VARMAX previously, then the easiest way to do this is to use a second PROC VARMAX step on the score data set with a RESTRICT statement to restrict *all* the parameter estimates to the previously estimated values.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR, Koen&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2026 10:47:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-VARMAX-getting-an-explicit-model-equation/m-p/986369#M5049</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2026-04-15T10:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Proc VARMAX - getting an explicit model equation</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-VARMAX-getting-an-explicit-model-equation/m-p/986379#M5050</link>
      <description>&lt;P&gt;great, thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2026 12:53:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-VARMAX-getting-an-explicit-model-equation/m-p/986379#M5050</guid>
      <dc:creator>Taliah</dc:creator>
      <dc:date>2026-04-15T12:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc VARMAX - getting an explicit model equation</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-VARMAX-getting-an-explicit-model-equation/m-p/986391#M5051</link>
      <description>&lt;P&gt;In these equations in the VARX(1,0) model,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;y1_t&amp;nbsp; = CONST1 + XL0_1_1*x_t +AR1_1_1*y1_t-1 + AR1_1_2*y2_t-1 + epsilon1_t&lt;/P&gt;
&lt;P&gt;y2_t = CONST2 +&amp;nbsp;XL0_2_1*x_t +AR1_2_1*y1_t-1 + AR1_2_2*y2_t-1 + epsilon2_t;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;current period y1_t and y2_t are expressed in terms of current period x_t, lagged period y1_t-1 and y2_t-1, they certainly allow you to compute forecast manually on y1_t and y2_t by plugging in x_t, y1_t-1, y2_t-1, as well as all the parameters in the equations. When actual values of y1_t-1 and y2_t-1 are available, you plug in the actual lagged y1_t-1 and y2_t-1 values. For future periods when no actual y1_t-1 and y2_t-1 are available any more, you substitute in the previously forecasted values for&amp;nbsp; y1_t-1 and y2_t-1. Following is an example using data step computations to obtain forecast on y1 and y2 using the above equations for VARX(1,0) example. The computed forecast match those produced in PROC VARMAX output.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data a ;
 do i = 1 to 100;
   x = normal(1);
   y1 = 2 + 3*x + rannor(235);
   y2 = 3 + 2*x + rannor(21);
   if i &amp;gt;90 then do ; 
                  y1 = . ;
                  y2 = . ;
				  end;
   output;
  end;
run;

proc print data = a; run;


ods output parameterestimates = parm;
proc varmax data = a ;
 model y1 y2 = x /p = 1 ;
 output out = outs lead = 10 ;
run;


proc print data =parm; run;


proc transpose data = parm(keep = Estimate) out = parms(rename=(COL1=CONST1 COL2 =XL0_1_1 COL3 = AR1_1_1 COL4 =AR1_1_2 COL5 = CONST2 COL6=XL0_2_1 COL7=AR1_2_1 COL8=AR1_2_2));
run;

proc print data = parms; run;



 data compte;
  merge a outs;  /*  merge input and output data sets to get X values   */
  if _n_ = 1 then set parms;  /*  merge parameter estimates into data set */
  t + 1;
  lagy1 = lag(y1);
  lagy2 = lag(y2);
  lagfy1 = lag(for1);
  lagfy2 = lag(for2);
  if t &amp;lt;= 91 then forecast1 = CONST1 + XL0_1_1*x +AR1_1_1*lagy1 + AR1_1_2*lagy2;
  if t &amp;gt; 91 then forecast1 = CONST1 + XL0_1_1*x +AR1_1_1*lagfy1 + AR1_1_2*lagfy2;

  if t &amp;lt;= 91 then forecast2 = CONST2 + XL0_2_1*x +AR1_2_1*lagy1 + AR1_2_2*lagy2;
  if t &amp;gt; 91 then forecast2 = CONST2 + XL0_2_1*x +AR1_2_1*lagfy1 + AR1_2_2*lagfy2;

  diff1 = for1 - forecast1 ;
  diff2 = for2 - forecast2 ;
  
run;

proc print data = compte;
  var  y1 y2 x for1 for2 forecast1 forecast2 diff1 diff2;
  
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2026 14:28:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-VARMAX-getting-an-explicit-model-equation/m-p/986391#M5051</guid>
      <dc:creator>SASCom1</dc:creator>
      <dc:date>2026-04-15T14:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc VARMAX - getting an explicit model equation</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-VARMAX-getting-an-explicit-model-equation/m-p/986419#M5053</link>
      <description>&lt;P&gt;great, thank you very much!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2026 07:09:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Proc-VARMAX-getting-an-explicit-model-equation/m-p/986419#M5053</guid>
      <dc:creator>Taliah</dc:creator>
      <dc:date>2026-04-16T07:09:16Z</dc:date>
    </item>
  </channel>
</rss>

