<?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: YRDIF oddity in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/YRDIF-oddity/m-p/27314#M4967</link>
    <description>see usage note &lt;A href="http://support.sas.com/kb/36/977.html" target="_blank"&gt;http://support.sas.com/kb/36/977.html&lt;/A&gt;</description>
    <pubDate>Wed, 03 Nov 2010 17:43:38 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2010-11-03T17:43:38Z</dc:date>
    <item>
      <title>YRDIF oddity</title>
      <link>https://communities.sas.com/t5/SAS-Programming/YRDIF-oddity/m-p/27313#M4966</link>
      <description>YRDIF seems to be returning inexact results for me.&lt;BR /&gt;
&lt;BR /&gt;
If I run the following in a data step:&lt;BR /&gt;
   test1 = yrdif('07JAN2000'd,'07JAN2001'd,"ACT/ACT");&lt;BR /&gt;
   test2 = yrdif('06JAN2000'd,'07JAN2001'd,"ACT/ACT");&lt;BR /&gt;
   test3 = yrdif('08JAN2000'd,'07JAN2001'd,"ACT/ACT");&lt;BR /&gt;
   test4 = 365/365;&lt;BR /&gt;
and then do a Proc Freq on the results, I get:&lt;BR /&gt;
Test1=1.0000449135&lt;BR /&gt;
Test2=1.002777154&lt;BR /&gt;
Test3=.9973126731&lt;BR /&gt;
Test4=1&lt;BR /&gt;
&lt;BR /&gt;
Test2 and Test3 are very close to what I'd expect (within floating point constraints) but I'd expect Test1 to be exactly 1. So what am I doing wrong?&lt;BR /&gt;
&lt;BR /&gt;
Jeff</description>
      <pubDate>Wed, 03 Nov 2010 17:39:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/YRDIF-oddity/m-p/27313#M4966</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-11-03T17:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: YRDIF oddity</title>
      <link>https://communities.sas.com/t5/SAS-Programming/YRDIF-oddity/m-p/27314#M4967</link>
      <description>see usage note &lt;A href="http://support.sas.com/kb/36/977.html" target="_blank"&gt;http://support.sas.com/kb/36/977.html&lt;/A&gt;</description>
      <pubDate>Wed, 03 Nov 2010 17:43:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/YRDIF-oddity/m-p/27314#M4967</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2010-11-03T17:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: YRDIF oddity</title>
      <link>https://communities.sas.com/t5/SAS-Programming/YRDIF-oddity/m-p/27315#M4968</link>
      <description>Well, that explains it! Thanks!&lt;BR /&gt;
&lt;BR /&gt;
Jeff</description>
      <pubDate>Wed, 03 Nov 2010 18:22:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/YRDIF-oddity/m-p/27315#M4968</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-11-03T18:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: YRDIF oddity</title>
      <link>https://communities.sas.com/t5/SAS-Programming/YRDIF-oddity/m-p/27316#M4969</link>
      <description>When the period includes a leap day, YRDIF adds the leap day and then averages it across four years (third arg is 'actual' or 'act/act').  If you are estimating a span of years then the value is off by a fraction of a day.  This seems to be incrementally better than the (stop-start)/365.25 formula.  Incrementally because either way the differences tend to be in the third decimal place.</description>
      <pubDate>Wed, 10 Nov 2010 18:08:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/YRDIF-oddity/m-p/27316#M4969</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2010-11-10T18:08:09Z</dc:date>
    </item>
  </channel>
</rss>

