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 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 permno dclrdt 10006 19620803 10006 19620315 10006 19621102 10006 19630802 10006 19650406 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 ata test5; set test4; yeardclrdt= year (DCLRDT); run; data potomit; set test5 (keep = permno dclrdt distcd yeardclrdt); run; proc sql; create table want3 as select *, 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 from potomit as a order by PERMNO,yeardclrdt ; quit; data want3; set want3; by PERMNO yeardclrdt ; if not last.yeardclrdt then omission=0; run;
... View more