Hello, I am trying to calculate annual rates of various diseases for various populations. I already have code that uses multiple macros to grab the corresponding population data and everything else I need. What I don't know how to do (new SAS user), is make my code repeat itself for the next year, then the next year, etc, until a certain year. For example, the code below does everything I want for the year 2006. I want it to re-run for 2007, then 2008, etc, until 2016. /*POPULATION FILE VARIABLES*/ %let pop_years = pop2006 ; %let sum_years = pop2006; %let pop_age = (AGEGROUP ne ''); %let n_years = 1; %let geogdenom = FIPS_STATE IN (16, 41, 53); %let pop_race_sex = (RACE = 1); /*CASE FILE VARIABLES**/ %let dataset = Q ; %let year = (year=2006); %let age = (agegroup ne '') ; %let geognum = FIPS_STATE_RES IN (16, 41, 53); %let race = (race = 1) ; %let sex = (sex ne '') ; %let cause = QR = 1; /*OUTPUT DESCRIPTORS*/ %let time = '2006'; %let measure = ' Q Deaths'; %let racesexage = 'Race1, Region Name, Both Sex, All Ages'; %Race1RATE; This is an output example of what I currently get: Population Year Count Pop Rate CI_Lower CI_Upper CI_LB CI_UB Ann_pop Region, Both Sex, All Ages 2006 1063 11510305 8.98953 8.43434 9.54471 0.55518 0.55518 11510305 Ideal output would have additional lines for the years 2007, 2008, etc up to 2016. Thank you so much!
... View more