Hello,
I am fairly new at SAS. Currently, I am trying to use SAS to change the name of certain variables/values for differing outputs (proc freq, etc). For example, in my data set, race is categorized as 1, 2, 3, and so on. I would like to be able to use proc freq and get outputs where as for the variable of race, 1 would be outputted as white, 2 as black, 3 as asian, and so on. I thought that formats would be the proper way to do so but after formatting, my printouts still simply say 1, 2, 3.. for race.
Here is the code I used for formatting:
proc format;
value frace
1 = 'Black'
2 = 'White'
3 = 'Asian'
4 = 'NativeAM'
5 = 'HawaiianPI'
6 = 'Multi'
7 = 'Other'
;
value **bleep**egroup
1 = '<20'
2 = '20-24'
3 = '25-29'
4 = '30-34'
5 = '35-39'
6 = '40+'
;
value fethnicity
1 = 'Non-Hisp'
2 = 'Hisp'
;
value fmarital
1 = 'Single'
2 = 'Separated'
3 = 'Divorced'
4 = 'Widowed'
5 = 'Married'
;
value fincomegroup
1 = '<35000'
2 = '35000-49999'
3 = '50000-74999'
4 = '75000-99999'
5 = '100000 or more'
;
value feducat
0 = 'None'
1 = 'Less than HS'
2 = 'Less than HS'
3 = 'Less than HS'
4 = 'Less than HS'
5 = 'Less than HS'
6 = 'Less than HS'
7 = 'Less than HS'
8 = 'Less than HS'
9 = 'High School'
10 = 'High School'
11 = 'High School'
12 = 'High School'
13 = 'More than HS'
14 = 'More than HS'
15 = 'More than HS'
16 = 'More than HS'
17 = 'More than HS'
18 = 'More than HS'
22 = 'More than HS'
;
run;
data tmp1.identificationformats;
set tmp1.identification2;
format Race frace. Agegroup **bleep**egroup. Ethnicity fEthnicity. Marital fMarital. Income fIncomegroup. Educat fEducat.;
run;
Thanks so much!!