I want to collapse just to count and delete, but then have the age groups preserved for the rows that are not deleted. Another way to say it: I want to count everyone in the county / census tract by sex and then delete where there are <10, ignoring age, but preserve the age group variable for future analyses. I was doing this: proc summary data=CRC; by sex county1 ctract; var count; output out=delete sum=; run; Which gives me the counts that I want, but does not keep the agegrp variable from the original dataset.
... View more