<?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: How to use min as timeinterval in timeseries in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-use-min-as-timeinterval-in-timeseries/m-p/199622#M1259</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello -&lt;/P&gt;&lt;P&gt;You should be able to take advantage of TIMESERIES without using any custom intervals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example to illustrate what I'm talking about:&lt;/P&gt;&lt;P&gt;*sashelp.citiday points to a sample data set which features daily data for several measurements;&lt;/P&gt;&lt;P&gt;*work.minmonth will contain min values for each day per month and will written to the WORK library;&lt;/P&gt;&lt;P&gt;proc timeseries data=sashelp.citiday out=work.minmonth;&lt;/P&gt;&lt;P&gt;*in the ID statement you tell TIMESERIES which interval you want to aggregate to - in this case MONTH by specifying the interval option;&lt;/P&gt;&lt;P&gt;*note that month needs to be in a valid SAS date or datetime format;&lt;/P&gt;&lt;P&gt;*if you data is of datetime format you will have to add a DT, for example interval=DTMONTH;&lt;/P&gt;&lt;P&gt;*using the accumulate option you specify how you want to accumulate - in this case only the minimum values are used;&lt;/P&gt;&lt;P&gt;id date interval=month accumulate=min;&lt;/P&gt;&lt;P&gt;*the VAR statement points TIMEDATA to the column of your table you want to use;&lt;/P&gt;&lt;P&gt;var snydjcm;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;Otherwise please share a sample of your data.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Udo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Aug 2015 12:31:37 GMT</pubDate>
    <dc:creator>udo_sas</dc:creator>
    <dc:date>2015-08-17T12:31:37Z</dc:date>
    <item>
      <title>How to use min as timeinterval in timeseries</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-use-min-as-timeinterval-in-timeseries/m-p/199621#M1258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a csv file structured as &lt;/P&gt;&lt;P&gt;(date=xx/xx/xxxx,time=xx:xx:xx.xxx(millisecond accuracy), var1=xx, var2=yy).&lt;/P&gt;&lt;P&gt;I want to look at autocorrelations of var1, var1*var2 etc at different time lags, e.g 1min, 2min, 10 min. There are several&lt;/P&gt;&lt;P&gt;observation at same date with same minute but at different milliseconds. For some dates or some time (&lt;SPAN style="font-size: 13.3333330154419px;"&gt;xx:xx:xx&lt;/SPAN&gt;),&lt;/P&gt;&lt;P&gt;there is no data also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I converted date and time to total minutes passed since beginning of cutoff year. I used that variable as timestamp&lt;/P&gt;&lt;P&gt;and calculated mean, std etc for &lt;SPAN style="font-size: 13.3333330154419px;"&gt; &lt;SPAN style="font-size: 13.3333330154419px;"&gt;var1, var1*var2&lt;/SPAN&gt; using proc means. However I want to use timeseries procedure&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;to find out correlations.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;SAS website says custom intervals cannot be used with timeseries but there might be another approach to solve this problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;A href="http://support.sas.com/kb/52/870.html"&gt;http://support.sas.com/kb/52/870.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Do you know how to use minutes for intervals?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can try to do it manually by defining new variables with different time lags but I need to do more complicated work for the dates/times where &lt;/P&gt;&lt;P&gt;there is no data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;seckin&lt;/P&gt;&lt;P&gt;p.s:I started learning sas very recently, I appreciate any help/suggestions. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 04:57:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-use-min-as-timeinterval-in-timeseries/m-p/199621#M1258</guid>
      <dc:creator>seckin</dc:creator>
      <dc:date>2015-08-15T04:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to use min as timeinterval in timeseries</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-use-min-as-timeinterval-in-timeseries/m-p/199622#M1259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello -&lt;/P&gt;&lt;P&gt;You should be able to take advantage of TIMESERIES without using any custom intervals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example to illustrate what I'm talking about:&lt;/P&gt;&lt;P&gt;*sashelp.citiday points to a sample data set which features daily data for several measurements;&lt;/P&gt;&lt;P&gt;*work.minmonth will contain min values for each day per month and will written to the WORK library;&lt;/P&gt;&lt;P&gt;proc timeseries data=sashelp.citiday out=work.minmonth;&lt;/P&gt;&lt;P&gt;*in the ID statement you tell TIMESERIES which interval you want to aggregate to - in this case MONTH by specifying the interval option;&lt;/P&gt;&lt;P&gt;*note that month needs to be in a valid SAS date or datetime format;&lt;/P&gt;&lt;P&gt;*if you data is of datetime format you will have to add a DT, for example interval=DTMONTH;&lt;/P&gt;&lt;P&gt;*using the accumulate option you specify how you want to accumulate - in this case only the minimum values are used;&lt;/P&gt;&lt;P&gt;id date interval=month accumulate=min;&lt;/P&gt;&lt;P&gt;*the VAR statement points TIMEDATA to the column of your table you want to use;&lt;/P&gt;&lt;P&gt;var snydjcm;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;Otherwise please share a sample of your data.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Udo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 12:31:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-use-min-as-timeinterval-in-timeseries/m-p/199622#M1259</guid>
      <dc:creator>udo_sas</dc:creator>
      <dc:date>2015-08-17T12:31:37Z</dc:date>
    </item>
  </channel>
</rss>

