<?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: dividend omissions sample question in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80757#M23268</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure I understand the criteria.&amp;nbsp; If it is 3 years, then the following would eliminate those records:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat dclrdt yymmdd8.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format dclrdt date9.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input permno&amp;nbsp; dclrdt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620803&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620315&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19621102&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19630802&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19650406&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19680406&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620803&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620315&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19621102&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19630802&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19650406&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19680405&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want (drop=_:);&lt;/P&gt;&lt;P&gt;&amp;nbsp; do until (last.permno);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; by permno;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _lastdclrdt=lag(dclrdt);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if span lt 3 then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; span=intck('year',_lastdclrdt,dclrdt,'C');&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do until (last.permno);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; by permno;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if span lt 3 then output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Nov 2012 19:06:05 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2012-11-26T19:06:05Z</dc:date>
    <item>
      <title>dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80754#M23265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I work on creating and omission sample with some restrictions in order to replicate a paper for my research. the paper i am trying to replicate mentions that "Using CRSP data on dividend payment history, a potential dividend omission is identified when a firm has not paid a dividend within 1 quarter, 6 months or 1 year from the previous payment if the firm pays quarterly, semi-annual or annual&lt;/P&gt;&lt;P&gt;dividends respectively. In this identification, we allow for "late" payments and define a 3-year period to consist of 1128 days or approximately 31 days in a month. For example if i had the following obseravtions and variables how do i add the restriction i mentioned above ( based on the restrction this is not an omission event as the last declaration is in the 3 -year perion&lt;/P&gt;&lt;P&gt;permno&amp;nbsp; dclrdt&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620803&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620315&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19621102&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19630802&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19650406&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a previous discussion somenone suggest a variable that find the last year of declarations and keep this observation as omission. tha code i used is the following&lt;/P&gt;&lt;P&gt;ata test5;&lt;/P&gt;&lt;P&gt; set test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp; yeardclrdt= year (DCLRDT);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data potomit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set test5 (keep = permno dclrdt distcd&amp;nbsp; yeardclrdt);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table want3 as&lt;/P&gt;&lt;P&gt; select *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case when (select count(yeardclrdt) from potomit as b where b.yeardclrdt=a.yeardclrdt+1 and b.PERMNO=a.PERMNO) gt 0 then 0 else 1 end as omission&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; from potomit as a&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; order by PERMNO,yeardclrdt ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;data want3;&lt;/P&gt;&lt;P&gt; set want3;&lt;/P&gt;&lt;P&gt; by PERMNO yeardclrdt ;&lt;/P&gt;&lt;P&gt; if not last.yeardclrdt then omission=0;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 18:20:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80754#M23265</guid>
      <dc:creator>totomkos</dc:creator>
      <dc:date>2012-11-26T18:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80755#M23266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you want to identify firms that have a 3 year or greater period without dividend, or just the records where it occurs?&amp;nbsp; If it is the latter, and if your data are already sorted by permno and dclrdt, then you might only need something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat dclrdt yymmdd8.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format dclrdt date9.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input permno&amp;nbsp; dclrdt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620803&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620315&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19621102&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19630802&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19650406&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19680406&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by permno;&lt;/P&gt;&lt;P&gt;&amp;nbsp; lastdclrdt=lag(dclrdt);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if first.permno then call missing(lastdclrdt);&lt;/P&gt;&lt;P&gt;&amp;nbsp; span=intck('year',lastdclrdt,dclrdt,'C');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 18:46:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80755#M23266</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-26T18:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80756#M23267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually ,i want to identify firms that omit dividends either by stop paying for a long long period (maybe they never pay again) or firms that used to pay dividends (quarterly, annually, or semiannually)&amp;nbsp; and the stop paying dividends for a period and afterthat the start again. The last case is the what i described in my example &lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620803&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620315&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19621102&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19630802&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19650406&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19680406&lt;/P&gt;&lt;P&gt;and by the definition of the restriction i have to exclude it from omision sample, but with the code i wrote above i did not.&lt;/P&gt;&lt;P&gt;thank you in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 18:57:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80756#M23267</guid>
      <dc:creator>totomkos</dc:creator>
      <dc:date>2012-11-26T18:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80757#M23268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure I understand the criteria.&amp;nbsp; If it is 3 years, then the following would eliminate those records:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat dclrdt yymmdd8.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format dclrdt date9.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input permno&amp;nbsp; dclrdt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620803&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620315&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19621102&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19630802&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19650406&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19680406&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620803&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620315&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19621102&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19630802&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19650406&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19680405&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want (drop=_:);&lt;/P&gt;&lt;P&gt;&amp;nbsp; do until (last.permno);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; by permno;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _lastdclrdt=lag(dclrdt);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if span lt 3 then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; span=intck('year',_lastdclrdt,dclrdt,'C');&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do until (last.permno);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; by permno;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if span lt 3 then output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 19:06:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80757#M23268</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-26T19:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80758#M23269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the help you provide me but i have one more question;&lt;/P&gt;&lt;P&gt;if we have the following sample&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620803&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620315&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19621102&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19630802&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19650406&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19680406&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620803&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620315&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19621102&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19630802&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19650406&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19680405&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;How can i find how often each company pays dividends (how many days between declarations) and compare that number with the criteria of late payment (3-year period)????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 19:14:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80758#M23269</guid>
      <dc:creator>totomkos</dc:creator>
      <dc:date>2012-11-26T19:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80759#M23270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Code like the following could be used to identify days between payments:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat dclrdt yymmdd8.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format dclrdt date9.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input permno&amp;nbsp; dclrdt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620803&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620315&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19621102&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19630802&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19650406&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19680406&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620803&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620315&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19621102&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19630802&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19650406&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19680405&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by permo dclrdt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want (drop=_:);&lt;/P&gt;&lt;P&gt;&amp;nbsp; set test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by permno;&lt;/P&gt;&lt;P&gt;&amp;nbsp; _lastdclrdt=lag(dclrdt);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if first.permno then call missing(_lastdclrdt);&lt;/P&gt;&lt;P&gt;&amp;nbsp; span=intck('day',_lastdclrdt,dclrdt,'C');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 19:27:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80759#M23270</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-26T19:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80760#M23271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I run the code you provide me&amp;nbsp; and find the days between declarations (span variable). Now if&amp;nbsp; i need to find the omissions&lt;/P&gt;&lt;P&gt;in the sample you give me, taking into account that i have an omission when i have the last declaration date or the previous before the last declaration if the days between the last and the previous to last is over 1128 days. how do i present this into sas code???&lt;/P&gt;&lt;P&gt;kostas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 19:42:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80760#M23271</guid>
      <dc:creator>totomkos</dc:creator>
      <dc:date>2012-11-26T19:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80761#M23272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat dclrdt yymmdd8.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format dclrdt date9.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input permno&amp;nbsp; dclrdt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620803&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620315&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19621102&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19630802&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19650406&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19680606&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620803&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620315&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19621102&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19630802&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19650406&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19680405&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by permo dclrdt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data delinquent (drop=_:) non_delinquent (drop=_:);&lt;/P&gt;&lt;P&gt;&amp;nbsp; do until (last.permno);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; by permno;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _lastdclrdt=lag(dclrdt);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if last.permno then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; span=intck('day',_lastdclrdt,dclrdt,'C');&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do until (last.permno);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; by permno;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if span gt 1128 then output delinquent;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else output non_delinquent;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 19:56:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80761#M23272</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-26T19:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80762#M23273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;while i run span=intck('day',_lastdclrdt,dclrdt,'C'); sas informs me that&lt;/P&gt;&lt;P&gt;The INTCK function call has too many arguments. how i overcome this&lt;/P&gt;&lt;P&gt;if i delete "c" i have two sample on with span filled 1095 and one with another value on span for every row...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 20:04:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80762#M23273</guid>
      <dc:creator>totomkos</dc:creator>
      <dc:date>2012-11-26T20:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80763#M23274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which version of SAS are you using?&amp;nbsp; I ran the code on 9.3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 20:07:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80763#M23274</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-26T20:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80764#M23275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have sas 9.1 unfortunately this is provided from my university&lt;/P&gt;&lt;P&gt;Any other way to do this????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 20:09:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80764#M23275</guid>
      <dc:creator>totomkos</dc:creator>
      <dc:date>2012-11-26T20:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80765#M23276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you are only looking for the number of days, just subtract the two dates.&amp;nbsp; e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat dclrdt yymmdd8.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format dclrdt date9.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input permno&amp;nbsp; dclrdt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620803&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620315&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19621102&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19630802&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19650406&lt;/P&gt;&lt;P&gt;10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19680606&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620803&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620315&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19621102&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19630802&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19650406&lt;/P&gt;&lt;P&gt;10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19680405&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by permno dclrdt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data delinquent (drop=_:) non_delinquent (drop=_:);&lt;/P&gt;&lt;P&gt;&amp;nbsp; do until (last.permno);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; by permno;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _lastdclrdt=lag(dclrdt);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if last.permno then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; span=sum(dclrdt-_lastdclrdt);&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do until (last.permno);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set test4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; by permno;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if span gt 1128 then output delinquent;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else output non_delinquent;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 20:18:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80765#M23276</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-26T20:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80766#M23277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is span 1095 and span 1157, as it is not the diff between days??? i care about the diff in days between 2 declarations and which declaration is the last one or the previous before the last declaration if the days between the last and the previous to last is over 1128 days. the code you sent just add as span a specific number not the number of each one from the previous one??? Then i have to take that difference and compare it to 1128... I hope that i clarify my point better...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 20:28:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80766#M23277</guid>
      <dc:creator>totomkos</dc:creator>
      <dc:date>2012-11-26T20:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80767#M23278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;They are the difference between the last and next to last dates (i.e., the number of days between those two dates) for each permno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I apparently don't understand exactly what you are looking for.&amp;nbsp; Expanding the example data with the values and flags that you want would probably facilitate your receiving the answer you are seeking.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 20:34:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80767#M23278</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-26T20:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80768#M23279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="540" style="width: 1px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="64"&gt;10006&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD align="right" class="xl63" width="68"&gt;3/8/1962&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;10006&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;15/3/1962&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;10006&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;2/11/1962&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;10006&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;2/8/1963&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;10006&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;6/4/1965&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;10006&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;6/6/1968&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;10007&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;4/5/1975&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;&lt;/TD&gt;&lt;TD class="xl63"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;10007&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD class="xl63"&gt;15/8/1975&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;10007&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;2/11/1975&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;&lt;/TD&gt;&lt;TD class="xl63"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;10007&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;4/1/1976&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;&lt;/TD&gt;&lt;TD class="xl63"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;10007&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;6/4/1982&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;&lt;/TD&gt;&lt;TD class="xl63"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;10007&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;7/7/1982&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;lets say that we have the above sample , as you can see in company with permno 10007 there are quartely distributions until 4/1/1976, then the company stopped paying dividend until 6/4/1982. This is by defintion and omission event (diff&amp;gt; 1128 days). For company 10006 , we have that it stop paying dividend on 6/6/1968, it never distribute dividend again. so if i have these cases in my sample i have to identify both of them adn not nly case 10006, which is easy as i keep the last observation.&lt;/P&gt;&lt;P&gt;So my code for identifying my sample ought to have 2 cases.&lt;/P&gt;&lt;P&gt;a. final distribution if firm never pays dividend again ---no more data---keep the last distribution&lt;/P&gt;&lt;P&gt;b. previous to last observation -last observation &amp;gt;1128&amp;nbsp; then i have also an omission and keep the previous to last abservation. ("last" does not mean that firm stop paying dividend for ever...for example a company had a long history of distributions, it stops for 5 years adn then started again -in this case i need the last observation before it stops paying .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that now it is clearer&lt;/P&gt;&lt;P&gt;thank you very much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 20:55:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80768#M23279</guid>
      <dc:creator>totomkos</dc:creator>
      <dc:date>2012-11-26T20:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80769#M23280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Almost clear enough.&amp;nbsp; You want a case identified if there is EVER a gap of more than 1128 days AND/OR the last payment is more than 1128 days beyond WHEN?&amp;nbsp; Today's date?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 21:50:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80769#M23280</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-26T21:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80770#M23281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK. If I understand what you mean.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data have;
&amp;nbsp; informat dclrdt yymmdd8.;
&amp;nbsp; format dclrdt date9.;
&amp;nbsp; input permno&amp;nbsp; dclrdt;
&amp;nbsp; cards;
10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620803
10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620315
10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19621102
10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19630802
10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19650406
10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19680406
10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620803
10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620315
10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19621102
10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19630802
10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19650406
10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19680406
;
run;
proc sql;
create table want as
 select *,case when (select count(*) from have as b where b.dclrdt between intnx('qtr',a.dclrdt,-1,'s') and a.dclrdt-1 and b.PERMNO=a.PERMNO) gt 0 then 0 else 1 end as omission_1qtr ,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case when (select count(*) from have as b where b.dclrdt between intnx('year',a.dclrdt,-1,'s') and a.dclrdt-1 and b.PERMNO=a.PERMNO) gt 0 then 0 else 1 end as omission_1year,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case when (select count(*) from have as b where b.dclrdt between intnx('year',a.dclrdt,-2,'s') and a.dclrdt-1 and b.PERMNO=a.PERMNO) gt 0 then 0 else 1 end as omission_2year
&amp;nbsp; from have as a
&amp;nbsp;&amp;nbsp; order by PERMNO,dclrdt ;
quit;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 04:07:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80770#M23281</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-11-27T04:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80771#M23282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the help but i would like to let me explain you more analytically my problem. i have a sample with companies that distribute dividends either quartely, semiannualy or annualy. Frist of all i want to identify which of them pays quarterly , which semiannually and which pays annually. That is why i need to calculate the days between two consecutive distributions. If for example a firm distributes in every around 90 days, ti pays quarterly etc. &lt;STRONG&gt;(sas code needed)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The next step is to identify when a firm omit dividends. I base my criteria on previous literature in which a potential dividend omission is identified when a firm has not paid a dividend within 1 quarter, 6 months or 1 year from the previous payment if the firm pays quarterly, semi-annual or annual dividends respectively.&lt;STRONG&gt; I would like to help me about issuing sas code related to this. &lt;/STRONG&gt; Additionally to the prvious statement related toomission identification, past papers allow for "late" payments and define a&lt;/P&gt;&lt;P&gt;3-year period to consist of 1128 days between payments.&lt;STRONG&gt; ( iwould be glad if can find the code for adding this to all the above)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Dec 2012 09:38:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80771#M23282</guid>
      <dc:creator>totomkos</dc:creator>
      <dc:date>2012-12-01T09:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80772#M23283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hi Toto. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have summarised your problem description and provided some code that may or may not be of more help to you as a template for what you need to do. To be fair to us SAS community helpers I am guessing that you could have given us all some more information about your problem. To be fair to you as a student I am guessing you are probably stressing out about your research task.&amp;nbsp; Am I right so far?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;This is likely still not all of what you need but hopefully it will stimulate some more clarification and/or be close enough so you can figure out the rest.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Please let us all know how you get on and if you need more suggestions or help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Cheers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Damien&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I work on creating an omission sample with some restrictions in order to replicate a paper for my research. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The paper I am trying to replicate mentions that &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Using CRSP data on dividend payment history, a potential dividend omission is identified when a firm has &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;not paid a dividend within 1 quarter, 6 months or 1 year from the previous payment if the firm pays quarterly, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;semi-annual or annual dividends respectively."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this identification, we allow for "late" payments and define a 3-year period to consist of 1128 days &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or approximately 31 days in a month. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example if I had the following obseravtions and variables how do I add the restriction I mentioned above &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(based on the restrction this is not an omission event as the last declaration is in the 3 -year period)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Have01(label='Sample data provided by student');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; informat DclrDt ddmmyy10.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; format DclrDt date9.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; input PermNo DclrDt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10006 3/8/1962 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10006 15/3/1962 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10006 2/11/1962 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10006 2/8/1963 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10006 6/4/1965 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10006 6/6/1968 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10007 4/5/1975 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10007 15/8/1975 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10007 2/11/1975 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10007 4/1/1976 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10007 6/4/1982 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10007 7/7/1982 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say that we have the above sample , as you can see in company with permno 10007 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are quartely distributions until 4/1/1976, then the company stopped paying dividend until 6/4/1982. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is by defintion an omission event (diff&amp;gt; 1128 days). For company 10006, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we have that it stops paying dividend on 6/6/1968, and it never distribute dividend again. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if I have these cases in my sample I have to identify both of them and not only case 10006, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which is easy as I keep the last observation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my code for identifying my sample ought to have 2 cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a. final distribution if firm never pays dividend again ---no more data---keep the last distribution&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b. previous to last observation -last observation &amp;gt;1128 then i have also an omission &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and keep the previous to last abservation. ("last" does not mean that firm stop paying dividend for ever.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;..for example a company had a long history of distributions, it stops for 5 years and then started again &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-in this case i need the last observation before it stops paying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I care about the diff in days between 2 declarations and which declaration is the last one &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or the previous before the last declaration if the days between the last and the previous to last is over 1128 days&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i find how often each company pays dividends (how many days between declarations) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and compare that number with the criteria of late payment (3-year period)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=Have01;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; by PermNo DclrDt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Have02&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; (label='Sample data sorted by Firm ID and divident payment date, and time from previous dividend in QTRs&amp;nbsp; and days')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; length Lag1DclrDt 8 LagDclrDays QTRs FlagLateDclr 3;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; format Lag1DclrDt Date9.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; set Have01;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; by PermNo DclrDt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Lag1DclrDt=lag1(DclrDt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if First.PermNo then Lag1DclrDt=.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; QTRs=intck('QTR',Lag1DclrDt,DclrDt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; LagDclrDays=DclrDt-Lag1DclrDt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; FlagLateDclr=(LagDclrDays gt 1128);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc summary data=Have02 nway;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; class PermNo;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Var QTRs DclrDt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; output &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; out=Have03&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; (&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; drop=_type_ _freq_ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; label='Useful dividend stats by firm: Usual dividend interval in QTRs, first and last dividend date'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; median(QTRs) = MedianDclrQtrs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; min(DclrDt) = FirstDcltDt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; max(DclrDt) = LastDclrDt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; create table Have04&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; (label='Sample dividend data joined to useful firm stats: usual divident interval in QTRs, late dividend and&amp;nbsp; omission flags')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; a.*,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; b.*,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; case&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; when&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.QTRs gt b.MedianDclrQTRs and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.FlagLateDclr ne 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end as FlagOmission&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; from&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Have02 as a,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Have03 as b&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; where&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; a.PermNo eq b.PermNo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Have05;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; set Have04(where=(FlagLateDclr eq 1 or FlagOmission eq 1));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Dec 2012 12:33:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80772#M23283</guid>
      <dc:creator>Damien_Mather</dc:creator>
      <dc:date>2012-12-01T12:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: dividend omissions sample question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80773#M23284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK.&lt;/P&gt;&lt;P&gt;You want to&amp;nbsp; firstly identify which of company pay quarterly or not, then identify a firm has not paid a dividend within 1 quarter&amp;nbsp; ? But I need some more sample data . The code below may help you a little bit .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data have;
&amp;nbsp; informat dclrdt yymmdd8.;
&amp;nbsp; format dclrdt date9.;
&amp;nbsp; input permno&amp;nbsp; dclrdt;
&amp;nbsp; cards;
10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620803
10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620315
10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19621102
10006&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620402
10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620803
10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19620315
10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19621102
10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19630802
10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19650406
10007&amp;nbsp;&amp;nbsp;&amp;nbsp; 19680406
;
run;
data have;
 set have;
 year=year(dclrdt);
 qtr=put(dclrdt,yyq.);
run;
proc sql;
create table omission_qtr as
 select *
&amp;nbsp; from have
&amp;nbsp;&amp;nbsp; group by permno
&amp;nbsp;&amp;nbsp;&amp;nbsp; having count(distinct year)*4 ne count(distinct qtr);
quit;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2012 04:52:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dividend-omissions-sample-question/m-p/80773#M23284</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-12-03T04:52:58Z</dc:date>
    </item>
  </channel>
</rss>

