Dear all,
I have a following problem. Suppose I have data in form of:
Failing for (in months) First Date of Fail
11 20APR2011
7 25OCT2011
2 08APR2011
3 13APR2011
3 26APR2011
6 02MAY2011
7 03MAY2011
6 11MAY2011
What I'm trying to achieve is to have a cumulative sum of 'Failings' by month and year, i.e. get columns in a form of
Year Month No. of Failed
2011 4 x
2011 5 y
etc.
It is easy to obtain cumulative sum of the column 'First Date of Fail', however I do not know how to incorporate the column 'Failing for (in months)' into the cumulative some (i.e. for the first observation, it will be counted as a fail for 11 months in the row including the first month of the fail)
Could anyone suggest an appropriate code or procedure in SAS?
Thank you,
Simi