Counting variables per observation per month in Sas.
Posted
by John
on Stack Overflow
See other posts from Stack Overflow
or by John
Published on 2010-04-05T16:12:04Z
Indexed on
2010/04/05
16:13 UTC
Read the original article
Hit count: 184
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?
© Stack Overflow or respective owner