I'm quite new to STATA and try to display a complex table, but even after hours of Googlin' I wasn't able to do so...
I have a dataset from a survey looking like this: The dataset contains the branche of the participants (there are 9 possible Branches) and 26 Questions. For each of these 26 Questions, one answer (Q_Option1 OR Q_Option2 OR Q_Option3) is chosen (Single Choice). For all variables, Branche and Question1-Question26, only a single variable is saved (no multiple selection was possible).
The answer options (Q_Option1 to Q_Option3) for questions Question1 to Question26 are always the same.
Branche | Question1 | Question2 | Question3 | Question4 | Question5 | Question6 | Question8 | ... | Question26 |
Br_Option1 Br_Option2 ... Br_Option9 |
Q_Option1 Q_Option2 Q_Option3 |
Q_Option1 Q_Option2 Q_Option3 |
Q_Option1 Q_Option2 Q_Option3 |
Q_Option1 Q_Option2 Q_Option3 |
Q_Option1 Q_Option2 Q_Option3 |
Q_Option1 Q_Option2 Q_Option3 |
Q_Option1 Q_Option2 Q_Option3 |
Q_Option1 Q_Option2 Q_Option3 |
Q_Option1 Q_Option2 Q_Option3 |
I would now like to have STATA create a table which looks like this: Having the total Number of selected answer options (N) per Question and then broken down by Branche. I hope I was able to make clear what I mean, I'd like the table to look like the following:
by Question and Branche |
Q_Option1 | Q_Option2 | Q_Option3 |
Question1 Br_Option1 Br_Option2 ... Br_Option9 |
N N N ... N |
N N N ... N |
N N N ... N |
Question2 Br_Option1 Br_Option2 ... Br_Option9 |
N N N ... N |
N N N ... N |
N N N ... N |
Question3 Br_Option1 Br_Option2 ... Br_Option9 |
N N N ... N |
N N N ... N |
N N N ... N |
... | |||
... | |||
... | |||
... | |||
Question26 Br_Option1 Br_Option2 ... Br_Option9 |
N N N ... N |
N N N ... N |
N N N ... N |
I am very grateful for any hints and tips, as I am really despairing on this...
Thanks a lot for your help!!
Stephan
0 Response to Displaying a Complex Table
Post a Comment