<?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: Time Series Forecasting System shows wrong estimates in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Time-Series-Forecasting-System-shows-wrong-estimates/m-p/436285#M2998</link>
    <description>&lt;P&gt;Thank you very much for your response! It was really helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Feb 2018 17:26:51 GMT</pubDate>
    <dc:creator>niam</dc:creator>
    <dc:date>2018-02-12T17:26:51Z</dc:date>
    <item>
      <title>Time Series Forecasting System shows wrong estimates</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Time-Series-Forecasting-System-shows-wrong-estimates/m-p/436008#M2992</link>
      <description>&lt;P&gt;I have come across this strange case in SAS Time Series Forecasting System and it seems that SAS is displaying wrong estimates.&lt;/P&gt;
&lt;P&gt;Here is a simple example.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I fit a quadratic trend to my dataset using TSFS, I get the following estimates:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" rules="all" frame="box" cellspacing="0" cellpadding="5" summary="Procedure Print: Data Set WORK._PARMS_"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="l header" scope="col"&gt;Model Parameter&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;Estimate&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;Std. Error&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;T&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;Prob&amp;gt;|T|&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Intercept&lt;/TH&gt;
&lt;TD class="r data"&gt;3.85465&lt;/TD&gt;
&lt;TD class="r data"&gt;0.3471&lt;/TD&gt;
&lt;TD class="r data"&gt;11.1041&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Linear Trend&lt;/TH&gt;
&lt;TD class="r data"&gt;-0.03373&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0089&lt;/TD&gt;
&lt;TD class="r data"&gt;-3.7788&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0003&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Quadratic Trend&lt;/TH&gt;
&lt;TD class="r data"&gt;-0.00117&lt;/TD&gt;
&lt;TD class="r data"&gt;0.000353&lt;/TD&gt;
&lt;TD class="r data"&gt;-3.3153&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0013&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Model Variance (sigma squared)&lt;/TH&gt;
&lt;TD class="r data"&gt;5.08917&lt;/TD&gt;
&lt;TD class="r data"&gt;.&lt;/TD&gt;
&lt;TD class="r data"&gt;.&lt;/TD&gt;
&lt;TD class="r data"&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;Now, when I run a simple regression (proc reg) on the same dataset, using proc reg, I get totally different results&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" rules="all" frame="box" cellspacing="0" cellpadding="5" summary="Procedure Reg: Parameter Estimates"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c b header" colspan="6" scope="colgroup"&gt;Parameter Estimates&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l b header" scope="col"&gt;Variable&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;DF&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Parameter&lt;BR /&gt;Estimate&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Standard&lt;BR /&gt;Error&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;t Value&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Pr&amp;gt; |t|&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Intercept&lt;/TH&gt;
&lt;TH class="r data"&gt;1&lt;/TH&gt;
&lt;TD class="r data"&gt;2.52733&lt;/TD&gt;
&lt;TD class="r data"&gt;0.71316&lt;/TD&gt;
&lt;TD class="r data"&gt;3.54&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0006&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;t&lt;/TH&gt;
&lt;TH class="r data"&gt;1&lt;/TH&gt;
&lt;TD class="r data"&gt;0.08578&lt;/TD&gt;
&lt;TD class="r data"&gt;0.03465&lt;/TD&gt;
&lt;TD class="r data"&gt;2.48&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0152&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;t2&lt;/TH&gt;
&lt;TH class="r data"&gt;1&lt;/TH&gt;
&lt;TD class="r data"&gt;-0.00117&lt;/TD&gt;
&lt;TD class="r data"&gt;0.00035340&lt;/TD&gt;
&lt;TD class="r data"&gt;-3.32&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0013&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;Interestingly, the oredicted values shown by TSFS system seem to be following the estimates shown by the PROC REG.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the predicted values of TSFS for the first three observations&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" rules="all" frame="box" cellspacing="0" cellpadding="5" summary="Procedure Print: Data Set WORK._FORB"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="r header" scope="col"&gt;Obs&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;PERIOD&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;ACTUAL&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;Predicted value&lt;BR /&gt;for INCIDENTS&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;Upper 95% Confidence&lt;BR /&gt;Limit&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;Lower 95% Confidence&lt;BR /&gt;Limit&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;Prediction error&lt;BR /&gt;for INCIDENTS&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;Prediction standard&lt;BR /&gt;error&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;Normalized prediction&lt;BR /&gt;error for INCIDENTS&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;Linear Trend&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;Quadratic Trend&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;1&lt;/TH&gt;
&lt;TD class="r data"&gt;NOV2009&lt;/TD&gt;
&lt;TD class="r data"&gt;1.0000&lt;/TD&gt;
&lt;TD class="r data"&gt;2.6119&lt;/TD&gt;
&lt;TD class="r data"&gt;7.0335&lt;/TD&gt;
&lt;TD class="r data"&gt;-1.8096&lt;/TD&gt;
&lt;TD class="r data"&gt;-1.6119&lt;/TD&gt;
&lt;TD class="r data"&gt;2.2559&lt;/TD&gt;
&lt;TD class="r data"&gt;-0.7145&lt;/TD&gt;
&lt;TD class="r data"&gt;-50&lt;/TD&gt;
&lt;TD class="r data"&gt;2500&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;2&lt;/TH&gt;
&lt;TD class="r data"&gt;DEC2009&lt;/TD&gt;
&lt;TD class="r data"&gt;2.0000&lt;/TD&gt;
&lt;TD class="r data"&gt;2.6942&lt;/TD&gt;
&lt;TD class="r data"&gt;7.1157&lt;/TD&gt;
&lt;TD class="r data"&gt;-1.7273&lt;/TD&gt;
&lt;TD class="r data"&gt;-0.6942&lt;/TD&gt;
&lt;TD class="r data"&gt;2.2559&lt;/TD&gt;
&lt;TD class="r data"&gt;-0.3077&lt;/TD&gt;
&lt;TD class="r data"&gt;-49&lt;/TD&gt;
&lt;TD class="r data"&gt;2401&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;3&lt;/TH&gt;
&lt;TD class="r data"&gt;JAN2010&lt;/TD&gt;
&lt;TD class="r data"&gt;4.0000&lt;/TD&gt;
&lt;TD class="r data"&gt;2.7741&lt;/TD&gt;
&lt;TD class="r data"&gt;7.1956&lt;/TD&gt;
&lt;TD class="r data"&gt;-1.6474&lt;/TD&gt;
&lt;TD class="r data"&gt;1.2259&lt;/TD&gt;
&lt;TD class="r data"&gt;2.2559&lt;/TD&gt;
&lt;TD class="r data"&gt;0.5434&lt;/TD&gt;
&lt;TD class="r data"&gt;-48&lt;/TD&gt;
&lt;TD class="r data"&gt;2304&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The values in the fourth column (Predicted value for INCIDENTS) are based the parameter estimates form PROC REG and not the estimates from TSFS. for example, for first observations:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.52733+ 0.08578*1 -0.00117*(1^2)=2.6119&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I noticed that this discrepancy between the estimates of proc OLS and TSFS happens only when there are high order terms included in the model (such as quadratic or cubic).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why is this happening and how can I get correct estimates using TSFS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2018 22:48:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Time-Series-Forecasting-System-shows-wrong-estimates/m-p/436008#M2992</guid>
      <dc:creator>niam</dc:creator>
      <dc:date>2018-02-10T22:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Time Series Forecasting System shows wrong estimates</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Time-Series-Forecasting-System-shows-wrong-estimates/m-p/436262#M2997</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The differences you&amp;nbsp;observed in the parameter estimates between the TSFS results and PROC REG are due to a difference in the definition of the linear and quadratic time trend terms.&amp;nbsp; For the quadratic time trend curve, the TSFS defines the _LINEAR_ regressor as&amp;nbsp; t - c, and the _QUAD_ regressor as ( t - c ) **2, whereas your PROC REG step uses&amp;nbsp;t and t**2, respectively.&amp;nbsp; Details on the definitions of the time trend terms used by the TSFS can be found in 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_tffordet_sect039.htm" target="_self"&gt;http://support.sas.com/documentation/cdl/en/etsug/68148/HTML/default/viewer.htm#etsug_tffordet_sect039.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For your data (and most of the other series I tested), c=50.&amp;nbsp; You can&amp;nbsp;determine the value of "c" used by the TSFS by looking at the Forecast Table in the Model Viewer.&amp;nbsp; The last two columns of this table contain the values of the _LINEAR_ and _QUAD_ variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To reproduce the parameter estimates&amp;nbsp;observed in the TSFS by&amp;nbsp;using PROC REG, you will need to define your time trend variables in the same manner as was used in the TSFS.&amp;nbsp; Please note that the predicted values will be the same between the TSFS and PROC REG, regardless of which definition of the time trend terms is used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps!&lt;/P&gt;
&lt;P&gt;DW&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 16:08:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Time-Series-Forecasting-System-shows-wrong-estimates/m-p/436262#M2997</guid>
      <dc:creator>dw_sas</dc:creator>
      <dc:date>2018-02-12T16:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Time Series Forecasting System shows wrong estimates</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Time-Series-Forecasting-System-shows-wrong-estimates/m-p/436285#M2998</link>
      <description>&lt;P&gt;Thank you very much for your response! It was really helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 17:26:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Time-Series-Forecasting-System-shows-wrong-estimates/m-p/436285#M2998</guid>
      <dc:creator>niam</dc:creator>
      <dc:date>2018-02-12T17:26:51Z</dc:date>
    </item>
  </channel>
</rss>

