- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
I am having trouble analyzing Multiple Choice questions of a survey.
Survey Monkey provided me a table with all answers to my questions.
For multiple choice questions it coded each choice into one variable.
When I analyze the data for one question, I get many tables (one for each variable).
I would like to know if it possible to get all "choice" variables in one single table:
With the current code:
Proc freq data=work.cmoj;
Tables (
Principales_act_1
Principales_act_2
Principales_act_3
Principales_act_4
Principales_act_5
Principales_act_6
Principales_act_7
Principales_act_otro) *Attendance_2019/ nocol norow;
Run;
I get one table for each variable, but what I want to do is have one table that includes all choice variable in rows, and the crossed variable choices in columns.
Thank you very much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
ID Question Response Attendance_2019
1 1 1 0
1 2 5 0
1 3 4 0
1 4 3 0
Then you can use a proc freq. Or you can capture those results and then use PROC TRANSPOSE on the results. Either are options.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Reeza:
Thank you very much for answer. I think transposing would't do what I need.
My data structure is in this way:
Attribute__1 | Attribute__2 | Attribute__3 | Attribute__4 | Attribute__5 | Type_assit |
Socialize | freq | ||||
Sessions | Congress | ocas | |||
Sessions | Congress | Certification | Social Service | Socialize | freq |
Sessions | ocas | ||||
Sessions | Congress | Certification | freq | ||
Sessions | Congress | Certification | ocas | ||
Sessions | Congress | Certification | Socialize | freq |
What I want to read is in this way:
freq | ocas | Total | freq | ocas | Total | |
Sessions | 10 | 9 | 19 | 36% | 38% | 37% |
Congress | 7 | 6 | 13 | 25% | 25% | 25% |
Certification | 6 | 3 | 9 | 21% | 13% | 17% |
Social Service | 2 | 2 | 4 | 7% | 8% | 8% |
Socialize | 3 | 4 | 7 | 11% | 17% | 13% |
28 | 24 | 52 | 100% | 100% | 100% |
Hope this can illustrate my issue, thanks again for your time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
proc transpose data=have out=long;
by type_assist;
var attribute1-attribute5;
run;
proc freq data=long;
table col1*type_assist;
run;
Or PROC TABULATE for percentages.
This is one approach, there are others. Feel free to choose the solution that meets your needs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content