<?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 detect drastic price changes within a time frame in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/detect-drastic-price-changes-within-a-time-frame/m-p/22799#M752</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This isn't really my area, but if you have a stationary process you can use SAS/QC control charts to monitor "normal" versus "abnormal" variation. The SHEWHART procedure has a wide variety of charts for monitoring processes. For example, see these two examples: &lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/qcug/63964/HTML/default/viewer.htm#qcug_shewhart_a0000003904.htm"&gt;http://support.sas.com/documentation/cdl/en/qcug/63964/HTML/default/viewer.htm#qcug_shewhart_a0000003904.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/qcug/63964/HTML/default/viewer.htm#qcug_shewhart_a0000003932.htm"&gt;http://support.sas.com/documentation/cdl/en/qcug/63964/HTML/default/viewer.htm#qcug_shewhart_a0000003932.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There is also the MACONTROL procedure for creating moving average control charts&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/qcug/63964/HTML/default/viewer.htm#qcug_macontrol_a0000000333.htm"&gt;http://support.sas.com/documentation/cdl/en/qcug/63964/HTML/default/viewer.htm#qcug_macontrol_a0000000333.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Mar 2012 14:01:21 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2012-03-06T14:01:21Z</dc:date>
    <item>
      <title>detect drastic price changes within a time frame</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/detect-drastic-price-changes-within-a-time-frame/m-p/22796#M749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I know there's somebody out there that knows how this can be coded in SAS.&amp;nbsp; What I'm looking for is a way to detect drastic price changes (upward or downward) within a 7 month period... so I have a large time series data (segregated by a couple of BY groups) that can have these drastic price changes, for example price from one month jumps up by 70% and then 4 months later drops by 40% or so... This spike is what I'd like to find.&amp;nbsp; I've done something with lags, and it seems to work 'Ok', but I know there is some coding out there that either someone tried, or makes better sense..&amp;nbsp; thanks all..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 13:33:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/detect-drastic-price-changes-within-a-time-frame/m-p/22796#M749</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2012-03-06T13:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: within timeline price changes drastically</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/detect-drastic-price-changes-within-a-time-frame/m-p/22797#M750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, if you have SAS/ETS, then proc expand seems to suit your need:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input a @@;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 2 3 4 3 5 6 2 10 5 6 1&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc expand data=have out=want;&lt;/P&gt;&lt;P&gt;convert a=b/ transformout=(MOVRANGE 3);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Above code is showing the how to obtain 'backward moving range' of 3 records. for your case, it will be 7 if your monthly data is outlined by rows. proc expand also supports&amp;nbsp; 'forward moving range'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: you mentioned lag(), which is not a bad idea in my opinion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want_lag;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;range=range(a,lag(a),lag2(a));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, this is the case for 3, if 7 bothers you, you can always use array to cut off some coding labor.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 13:48:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/detect-drastic-price-changes-within-a-time-frame/m-p/22797#M750</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-03-06T13:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: within timeline price changes drastically</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/detect-drastic-price-changes-within-a-time-frame/m-p/22798#M751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Haikuo, but I've tried that before.. the problem is I'm looking for spikes that could be 2 months long or 7 months long, and the data is already seasonal and averaged out... it's these certain spikes that may pop up in certain months and in certain series.&amp;nbsp; As I need to identify the 'Bad ares' first, and then I can apply the proc expand to them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 13:54:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/detect-drastic-price-changes-within-a-time-frame/m-p/22798#M751</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2012-03-06T13:54:08Z</dc:date>
    </item>
    <item>
      <title>detect drastic price changes within a time frame</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/detect-drastic-price-changes-within-a-time-frame/m-p/22799#M752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This isn't really my area, but if you have a stationary process you can use SAS/QC control charts to monitor "normal" versus "abnormal" variation. The SHEWHART procedure has a wide variety of charts for monitoring processes. For example, see these two examples: &lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/qcug/63964/HTML/default/viewer.htm#qcug_shewhart_a0000003904.htm"&gt;http://support.sas.com/documentation/cdl/en/qcug/63964/HTML/default/viewer.htm#qcug_shewhart_a0000003904.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/qcug/63964/HTML/default/viewer.htm#qcug_shewhart_a0000003932.htm"&gt;http://support.sas.com/documentation/cdl/en/qcug/63964/HTML/default/viewer.htm#qcug_shewhart_a0000003932.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There is also the MACONTROL procedure for creating moving average control charts&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/qcug/63964/HTML/default/viewer.htm#qcug_macontrol_a0000000333.htm"&gt;http://support.sas.com/documentation/cdl/en/qcug/63964/HTML/default/viewer.htm#qcug_macontrol_a0000000333.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 14:01:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/detect-drastic-price-changes-within-a-time-frame/m-p/22799#M752</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-03-06T14:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: within timeline price changes drastically</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/detect-drastic-price-changes-within-a-time-frame/m-p/22800#M753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; So your data is not monthly basis, rather, they are averaged on seasonal basis? And you are trying to identify certain 'spiking' month? Can you post just a few line of your data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 14:04:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/detect-drastic-price-changes-within-a-time-frame/m-p/22800#M753</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-03-06T14:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: within timeline price changes drastically</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/detect-drastic-price-changes-within-a-time-frame/m-p/22801#M754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; It's monthly based, but it is on a 6-month rolling average... but where there is a low count, the spikes happen... here's some examples...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Date&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="text-decoration: underline;"&gt;Price&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2003.03&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 571&lt;/P&gt;&lt;P&gt;2003.04&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 483&lt;/P&gt;&lt;P&gt;2003.05&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 571&lt;/P&gt;&lt;P&gt;2003.06&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 428&lt;/P&gt;&lt;P&gt;2003.07&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 428&lt;/P&gt;&lt;P&gt;2003.08&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 395&lt;/P&gt;&lt;P&gt;2003.09&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 334&lt;/P&gt;&lt;P&gt;2003.10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 242&lt;/P&gt;&lt;P&gt;2003.11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 243&lt;/P&gt;&lt;P&gt;2003.12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 251&lt;/P&gt;&lt;P&gt;2004.01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 267&lt;/P&gt;&lt;P&gt;2004.02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 244&lt;/P&gt;&lt;P&gt;... it could gradually go up to Price= 600 which is fine...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And another Sample is&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Date&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="text-decoration: underline;"&gt;Price&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2002.11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 267&lt;/P&gt;&lt;P&gt;2002.12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 278&lt;/P&gt;&lt;P&gt;2003.01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 330&lt;/P&gt;&lt;P&gt;2003.02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 390&lt;/P&gt;&lt;P&gt;2003.03&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 571&lt;/P&gt;&lt;P&gt;2003.04&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 483&lt;/P&gt;&lt;P&gt;2003.05&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 571&lt;/P&gt;&lt;P&gt;2003.06&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 428&lt;/P&gt;&lt;P&gt;2003.07&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 428&lt;/P&gt;&lt;P&gt;2003.08&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 395&lt;/P&gt;&lt;P&gt;2003.09&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 334&lt;/P&gt;&lt;P&gt;2003.10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 242&lt;/P&gt;&lt;P&gt;2003.11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 243&lt;/P&gt;&lt;P&gt;2003.12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 251&lt;/P&gt;&lt;P&gt;2004.01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 267&lt;/P&gt;&lt;P&gt;2004.02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 244&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 14:14:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/detect-drastic-price-changes-within-a-time-frame/m-p/22801#M754</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2012-03-06T14:14:03Z</dc:date>
    </item>
  </channel>
</rss>

