<?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: simulate multiple forecast paths using proc varmax in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/simulate-multiple-forecast-paths-using-proc-varmax/m-p/409261#M2762</link>
    <description>&lt;P&gt;
Yes, this is covered in Chapter 11 (pp. 204-207) of &lt;A href="https://www.sas.com/sas/books/authors/rick-wicklin.html" target="_blank"&gt;&lt;EM&gt;Simulating Data with SAS&lt;/EM&gt;&lt;/A&gt;. (Code available from the web site.) Briefly, you estimate the parameters for the model, including the magnitude of the error terms. 
&lt;/P&gt;&lt;P&gt;
The example in the book uses a simple one-variable regression with independent normal errrors. An OLS regression for the Sashelp.Class data is Weight = -143 + 3.9*Height + eps, where eps ~ N(0, 11.23). The following simulation is from p. 205. It simulates 100 data sets, each with different observed errors.
&lt;/P&gt;
&lt;PRE lang="sas" escaped="true"&gt;
/* duplicate data by using sequential access followed by a sort     */
%let NumSamples = 100;              /* number of samples            */
data StudentSim(drop= b0 b1 rmse);
b0 = -143; b1 = 3.9; rmse = 11.23;  /* parameter estimates          */
call streaminit(1);
set Sashelp.Class;                  /* implicit loop over obs       */
i = _N_;
eta = b0 + b1*Height;               /* linear predictor for student */
do SampleID = 1 to &amp;amp;NumSamples;
   Weight = eta + rand("Normal", 0, rmse);
   output;
end;
run;

proc sort data=StudentSim;
   by SampleID i;
run;
&lt;/PRE&gt;

&lt;P&gt;
You can then use BY-group analysis to get 100 "new" simulated analyses, each with its own predictions.
The book does not have a VARMAX example, but hopefully you can generalize the main ideas of this example.
&lt;/P&gt;</description>
    <pubDate>Tue, 31 Oct 2017 18:43:09 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2017-10-31T18:43:09Z</dc:date>
    <item>
      <title>simulate multiple forecast paths using proc varmax</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/simulate-multiple-forecast-paths-using-proc-varmax/m-p/408963#M2756</link>
      <description>&lt;P&gt;i am trying to simulate multiple scenarios from a VAR model using proc varmax. The idea is that proc varmax provides a forecast series and then multiple scenarios are generated around that series. I am currently running the following model:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on;
proc varmax data=in(firstobs = 2) covout Outest = estin Outstat = s  plot = (residual model forecast);
   id ReportingDate interval=quarter align = end ;
   model cpi ump gdp hpi / 
   				 nseason = 4
/*				 cointtest=(johansen)*/
				 Dif = (cpi(1) ump(1) gdp(1) hpi(1)) 
				 p=4
				 	
   				 dftest
				 
                 print=(estimates diagnose);
			     output out=in_fct lead=12;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This gives me a 12 period forecast.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wanted to know if it is possible using Proc Varmax to generate multiple paths? My understanding is that you can create paths by generating a normally distributed residual distribution and then adding it back to the model estimates. But I am unclear as to how that works out in the procedure or how we can do this in SAS altogether.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 02:48:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/simulate-multiple-forecast-paths-using-proc-varmax/m-p/408963#M2756</guid>
      <dc:creator>eemrun</dc:creator>
      <dc:date>2017-10-31T02:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: simulate multiple forecast paths using proc varmax</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/simulate-multiple-forecast-paths-using-proc-varmax/m-p/409261#M2762</link>
      <description>&lt;P&gt;
Yes, this is covered in Chapter 11 (pp. 204-207) of &lt;A href="https://www.sas.com/sas/books/authors/rick-wicklin.html" target="_blank"&gt;&lt;EM&gt;Simulating Data with SAS&lt;/EM&gt;&lt;/A&gt;. (Code available from the web site.) Briefly, you estimate the parameters for the model, including the magnitude of the error terms. 
&lt;/P&gt;&lt;P&gt;
The example in the book uses a simple one-variable regression with independent normal errrors. An OLS regression for the Sashelp.Class data is Weight = -143 + 3.9*Height + eps, where eps ~ N(0, 11.23). The following simulation is from p. 205. It simulates 100 data sets, each with different observed errors.
&lt;/P&gt;
&lt;PRE lang="sas" escaped="true"&gt;
/* duplicate data by using sequential access followed by a sort     */
%let NumSamples = 100;              /* number of samples            */
data StudentSim(drop= b0 b1 rmse);
b0 = -143; b1 = 3.9; rmse = 11.23;  /* parameter estimates          */
call streaminit(1);
set Sashelp.Class;                  /* implicit loop over obs       */
i = _N_;
eta = b0 + b1*Height;               /* linear predictor for student */
do SampleID = 1 to &amp;amp;NumSamples;
   Weight = eta + rand("Normal", 0, rmse);
   output;
end;
run;

proc sort data=StudentSim;
   by SampleID i;
run;
&lt;/PRE&gt;

&lt;P&gt;
You can then use BY-group analysis to get 100 "new" simulated analyses, each with its own predictions.
The book does not have a VARMAX example, but hopefully you can generalize the main ideas of this example.
&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 18:43:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/simulate-multiple-forecast-paths-using-proc-varmax/m-p/409261#M2762</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-10-31T18:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: simulate multiple forecast paths using proc varmax</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/simulate-multiple-forecast-paths-using-proc-varmax/m-p/409747#M2790</link>
      <description>This is very useful. Thanks Rick. I will try it out with Varmax</description>
      <pubDate>Thu, 02 Nov 2017 09:44:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/simulate-multiple-forecast-paths-using-proc-varmax/m-p/409747#M2790</guid>
      <dc:creator>eemrun</dc:creator>
      <dc:date>2017-11-02T09:44:02Z</dc:date>
    </item>
  </channel>
</rss>

