Hi....I have survey data that consist of two columns (Question, Response) that has been converted to numeric. I would like to convert the data to its original responses. Is there a way to specify which questions (they are number by Q1, Q2,....) to apply each formatting as not all questions have the same ranges. Thanks.
proc format;
value resp
1='Disagree'
2='Neutral'
3='Agree'
;
proc format;
value Gender
1='Male'
2='Female'
;
Please provide something that looks like your data.
If you actually only have two variables in the data then to do what you want you likely need to transpose the data so that you have one observation per data respondent. How to do that depends on the actual data that you have.
Something like:
ID Var1 Var2
where Var1 has the numeric value for the first question response and Var2 has the numeric value of the second question.
Then you would assign the formats with something like:
format var1 resp. var2 gender. ;
Please provide something that looks like your data.
If you actually only have two variables in the data then to do what you want you likely need to transpose the data so that you have one observation per data respondent. How to do that depends on the actual data that you have.
Something like:
ID Var1 Var2
where Var1 has the numeric value for the first question response and Var2 has the numeric value of the second question.
Then you would assign the formats with something like:
format var1 resp. var2 gender. ;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: