I have a list of counties in each state that received nonattainment status in years 1995-2005.
I want to know how many counties in each state each year that received this status.
If my data is formatted like this,
State1 Country1 YR1 Yr2 Yr3 Yr4...
State1 Country2 YR1 Yr2 Yr3 Yr4
State2 County1 Yr1 Yr2.....
Each year variable could have a 1 or a zero, since a county may gain or lose this status in a time period.
I need to count each year how many counties in each state have nonattainment status (YRx=1), but can't think of how to do it.