@jcochrane424:
Did you look at your input data after you created the data set? Your INPUT statement is messed up: It inputs DATE twice, and AGE_GROUP is read a a numeric variable while it's chock full of alphas. A correct input step, given your data, could look like this:
data have ;
infile cards dlm=',' ;
input date :8. gender :$20. age_group :$25. population_in_thousands ;
format population_in_thousands comma10. ;
cards ;
2015,both sexes,65 years and over,47695
2015,both sexes,85 years and over,6306
2015,female, 65 years and over,26654
2015,female, 85 years and over,4143
2015,male, 65 years and over,21041
2015,male, 85 years and over,2163
;
run ;
You can't expect correct output from incorrect input: It's otherwise known as GIGO. Now rerun your code against the correct input, and if you should have any incongruences you don't anticipate, ask about them.
Kind regards
Paul D.
... View more