<?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: SMAPE calculation in tsmodel/utlstat seems to give wrong result in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/SMAPE-calculation-in-tsmodel-utlstat-seems-to-give-wrong-result/m-p/753335#M4166</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't get a satisfactory answer on this very quick I would contact Technical Support in your local SAS office.&lt;BR /&gt;If what you report is really a problem in the software it will correctly and quickly stream through to R&amp;amp;D and it will be fixed.&lt;/P&gt;
&lt;P&gt;Whatever you are doing wrong (or not), a value of &amp;gt; 700 should never be reported if the symmetric mean absolute percentage error (SMAPE or sMAPE) is bounded between&amp;nbsp;&lt;SPAN&gt;0% and&amp;nbsp;200%.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Do you have missing values in the series at the beginning of the data set? I remember about a problem with SMAPE and missing values at the beginning of the series but it was fixed in 2005!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Koen&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jul 2021 13:21:01 GMT</pubDate>
    <dc:creator>sbxkoenk</dc:creator>
    <dc:date>2021-07-10T13:21:01Z</dc:date>
    <item>
      <title>SMAPE calculation in tsmodel/utlstat seems to give wrong result</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/SMAPE-calculation-in-tsmodel-utlstat-seems-to-give-wrong-result/m-p/753089#M4159</link>
      <description>&lt;P&gt;Hi, I have a time series with it's prediction (attached). I calculate the SMAPE with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;cas session;

libname D cas caslib="CASUSER";

proc tsmodel 
    data=D.TESTSMAPE
    outobj=(utlstat=D.OUTSTATS(replace=YES));
    id DATE interval=day;
    var MEASURED SARIMA;
    require utl;
    submit;
    declare object utlstat(utlstat);
    rc = utlstat.Collect(MEASURED, SARIMA);
    endsubmit;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In D.OUTSTATS I get that &lt;STRONG&gt;SMAPE =&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;719.77&lt;/STRONG&gt;. That is very wierd, since the SMAPE metric is bounded between [0%,200%].&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I tried the same calculation by hand using the standard SMAPE formula&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;100%/N * SUM [ |PREDICTED-MEASURED| / ((|MEASURED|+|PREDICTED|)/2) ]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;and I get &lt;STRONG&gt;SMAPE = 119.43&lt;/STRONG&gt; which seems correct, as shown in the attached excel file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So what is SAS doing? Where that 719.77 value comes from?!?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 09:17:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/SMAPE-calculation-in-tsmodel-utlstat-seems-to-give-wrong-result/m-p/753089#M4159</guid>
      <dc:creator>Edoedoedo</dc:creator>
      <dc:date>2021-07-09T09:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: SMAPE calculation in tsmodel/utlstat seems to give wrong result</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/SMAPE-calculation-in-tsmodel-utlstat-seems-to-give-wrong-result/m-p/753335#M4166</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't get a satisfactory answer on this very quick I would contact Technical Support in your local SAS office.&lt;BR /&gt;If what you report is really a problem in the software it will correctly and quickly stream through to R&amp;amp;D and it will be fixed.&lt;/P&gt;
&lt;P&gt;Whatever you are doing wrong (or not), a value of &amp;gt; 700 should never be reported if the symmetric mean absolute percentage error (SMAPE or sMAPE) is bounded between&amp;nbsp;&lt;SPAN&gt;0% and&amp;nbsp;200%.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Do you have missing values in the series at the beginning of the data set? I remember about a problem with SMAPE and missing values at the beginning of the series but it was fixed in 2005!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Koen&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jul 2021 13:21:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/SMAPE-calculation-in-tsmodel-utlstat-seems-to-give-wrong-result/m-p/753335#M4166</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-07-10T13:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: SMAPE calculation in tsmodel/utlstat seems to give wrong result</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/SMAPE-calculation-in-tsmodel-utlstat-seems-to-give-wrong-result/m-p/753496#M4171</link>
      <description>&lt;P&gt;Thank you, as you suggested I opened a ticket for Technical Support.&lt;/P&gt;
&lt;P&gt;I thought as well that the problem may have something related to missing values, but after removing all missing values still the result is 719, so I guess the missing are handled correctly and the problem is not there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll share useful news as soon as I have ones.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 13:19:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/SMAPE-calculation-in-tsmodel-utlstat-seems-to-give-wrong-result/m-p/753496#M4171</guid>
      <dc:creator>Edoedoedo</dc:creator>
      <dc:date>2021-07-12T13:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: SMAPE calculation in tsmodel/utlstat seems to give wrong result</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/SMAPE-calculation-in-tsmodel-utlstat-seems-to-give-wrong-result/m-p/755367#M4200</link>
      <description>&lt;P&gt;Since you have opened Technical Support track regarding this question, I am posting below a summary of the response you already received from Technical Support just to close out this thread.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="trackPages"&gt;
&lt;DIV id="Page-2582382919596180907" class="page"&gt;
&lt;DIV id="DivData-2582382919596180907" class="pageData"&gt;
&lt;P class="cs2654AE3A"&gt;&lt;SPAN class="csF53863FF"&gt;The TSMODEL Procedure calculates the absolute symmetric percent error(ASPE), and its mean, as originally proposed by Markakis and Armstrong. &amp;nbsp;From the &lt;A class="cs7E736E" href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/hpfug/hpfug_hpfdet_sect044.htm" target="new"&gt;&lt;SPAN class="csB7CE8BEA"&gt;Statistics of Fit&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN class="csF53863FF"&gt; section of the documentation, the formula for ASPE is:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs2654AE3A"&gt;&lt;SPAN class="csF53863FF"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs746A5FAB"&gt;&lt;SPAN class="csF53863FF"&gt;| 100 * ( SARIMA - MEASURED) / 0.5 * ( SARIMA + MEASURED) |&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs2654AE3A"&gt;&lt;SPAN class="csF53863FF"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs2654AE3A"&gt;&lt;SPAN class="csF53863FF"&gt;Rob Hyndman wrote an interesting article on this topic, &lt;A class="cs7E736E" href="https://robjhyndman.com/hyndsight/smape/" target="new"&gt;&lt;SPAN class="csB7CE8BEA"&gt;Errors on percentage errors | Rob J Hyndman&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN class="csF53863FF"&gt;, in which he credits the wikipedia formula to Chen and Yang (2004).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV id="trackPages"&gt;
&lt;DIV id="Page-2582382919596180907" class="page"&gt;
&lt;DIV id="DivData-2582382919596180907" class="pageData"&gt;
&lt;P class="cs2654AE3A"&gt;&lt;SPAN class="csF53863FF"&gt;While we don't have a copy of the Chen and Yang paper on hand to verify,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;R&amp;amp;D is considering adding the statistic to those provided by TSMODEL in the future.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 20 Jul 2021 13:52:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/SMAPE-calculation-in-tsmodel-utlstat-seems-to-give-wrong-result/m-p/755367#M4200</guid>
      <dc:creator>SASCom1</dc:creator>
      <dc:date>2021-07-20T13:52:35Z</dc:date>
    </item>
  </channel>
</rss>

