Counting variables per observation per month in Sas.
- by John
Hey guys,
a quick question, I have data of the following sort:
Ticker _ Date _ Fem Analyst (dummy 1 if true)
AA _ 04/2001 _ 1
AA _ 04/2001 _ 1
AA _ 04/2001 _ 1
AA _ 05/2002 _ 1
AA _ 05/2002 _ 1
AA _ 07/2002 _ 0
AA _ 04/2003 _ 1
and so on.. What I want to receive is the following:
Ticker _ Date _ Number of fem analyst
AA _ 04/2001 _ 3
AA _ 05/2002 _ 2
AA _ 07/2002 _ 0
AA _ 04/2003 _ 1
So an easy counting algorithm that allows me to count for the number of analysts per company per month (the date is in 01/04/2002 format but I also have a month count variable which can be used too)
Any ideas?