<?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: Sas Code to calculate monthly variance in daily data and to plot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Sas-Code-to-calculate-monthly-variance-in-daily-data-and-to-plot/m-p/115696#M4369</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached the data set in a new discussion titled 'Help wit SAS code' can you please help me write this code..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 08 Sep 2012 18:28:39 GMT</pubDate>
    <dc:creator>malakaext</dc:creator>
    <dc:date>2012-09-08T18:28:39Z</dc:date>
    <item>
      <title>Sas Code to calculate monthly variance in daily data and to plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sas-Code-to-calculate-monthly-variance-in-daily-data-and-to-plot/m-p/115693#M4366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to sas and having a hard time finding the monthly variance in the daily data set I have attached here ( i have deleted some part of the data to make the file smaller).&lt;/P&gt;&lt;P&gt;I want to plot monthly variance of this daily data from 2000 to 2010 so that I can see if there's a pattern.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please be kind enough to help me with this coding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS. Im using SAS 9.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Malaka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Sep 2012 17:31:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sas-Code-to-calculate-monthly-variance-in-daily-data-and-to-plot/m-p/115693#M4366</guid>
      <dc:creator>malakaext</dc:creator>
      <dc:date>2012-09-08T17:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sas Code to calculate monthly variance in daily data and to plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sas-Code-to-calculate-monthly-variance-in-daily-data-and-to-plot/m-p/115694#M4367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ... you posted data in a PDF file ... hard to use.&amp;nbsp; How about posting a data set or text or XLS (something that is easily used).&amp;nbsp; Also, the PDF has lost of columns but no variable names.&amp;nbsp; The first column is date, but what column do you want analyzed (variance computation).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an example using a data set from the SASHELP library (n case V9 does not have the TIMEDATA data set, it's attached) ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;* use a SASHELP data set ... extract date from variable DATETIME;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;data test (keep=date volume);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;set sashelp.timedata;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;date = datepart(datetime);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;* calculate monthly variance for variable VOLUME;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;proc summary data=test nway;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;class date;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;var volume;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;output out=month_var var=;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;format date monyy.;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;* set graphics options;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;goptions reset=all ftext='calibri' htext=2 gunit=pct;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;* choose a symbol ... use a spline to fit to the monthly data;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;symbol f='wingdings' v='6c'x i=smp66 c=blue h=2 w=2;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;axis1 minor=none label=("MONTH-YEAR");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;axis2 label=(a=90 'VOLUME');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;title1 h=4 'MONTHLY VARIANCE OF VOLUME' ls=2;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;* add white s[ace around plot;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;title2 a=90 ls=2;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;title3 a=-90 ls=2;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;footnote1 ls=1;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;* plot the values;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;proc gplot data=month_var;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;plot volume*date / haxis=axis1 vaxis=axis2 noframe;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;format volume comma7.;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11867i8E4729018DF14BD4/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="month_var.png" title="month_var.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Sep 2012 18:03:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sas-Code-to-calculate-monthly-variance-in-daily-data-and-to-plot/m-p/115694#M4367</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2012-09-08T18:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sas Code to calculate monthly variance in daily data and to plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sas-Code-to-calculate-monthly-variance-in-daily-data-and-to-plot/m-p/115695#M4368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi thank you very much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sorry I couldn't mention the column titles. They are: date, open, high, low, close, volume, adjclose, return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need the variance to be calculated for every month for every year, so I could see the pattern.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I tried to attach the excel file it didn't let me...if you send me your email address I can send it to you...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate you help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Malaka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Sep 2012 18:11:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sas-Code-to-calculate-monthly-variance-in-daily-data-and-to-plot/m-p/115695#M4368</guid>
      <dc:creator>malakaext</dc:creator>
      <dc:date>2012-09-08T18:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Sas Code to calculate monthly variance in daily data and to plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sas-Code-to-calculate-monthly-variance-in-daily-data-and-to-plot/m-p/115696#M4369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached the data set in a new discussion titled 'Help wit SAS code' can you please help me write this code..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Sep 2012 18:28:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sas-Code-to-calculate-monthly-variance-in-daily-data-and-to-plot/m-p/115696#M4369</guid>
      <dc:creator>malakaext</dc:creator>
      <dc:date>2012-09-08T18:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Sas Code to calculate monthly variance in daily data and to plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sas-Code-to-calculate-monthly-variance-in-daily-data-and-to-plot/m-p/115697#M4370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ... did you try first converting the XLS file to a ZIP file then attaching.&amp;nbsp; Give that a try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Sep 2012 19:01:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sas-Code-to-calculate-monthly-variance-in-daily-data-and-to-plot/m-p/115697#M4370</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2012-09-08T19:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sas Code to calculate monthly variance in daily data and to plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sas-Code-to-calculate-monthly-variance-in-daily-data-and-to-plot/m-p/115698#M4371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Here's the data..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Sep 2012 20:14:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sas-Code-to-calculate-monthly-variance-in-daily-data-and-to-plot/m-p/115698#M4371</guid>
      <dc:creator>malakaext</dc:creator>
      <dc:date>2012-09-08T20:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sas Code to calculate monthly variance in daily data and to plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sas-Code-to-calculate-monthly-variance-in-daily-data-and-to-plot/m-p/115699#M4372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ... I posted an answer in the other THREAD that you started.&amp;nbsp; Let me know if you find it and if it works for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Sep 2012 20:27:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sas-Code-to-calculate-monthly-variance-in-daily-data-and-to-plot/m-p/115699#M4372</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2012-09-08T20:27:09Z</dc:date>
    </item>
  </channel>
</rss>

