I just started working with stata, so my knowledge is very basic.
My dataset includes several questions that respondents could answer on a scale from 1 - 4. The intention of these questions was to test the knowledge of respondents, so there is one correct answer, two incorrect answers and a category for "do not know".
I want to create a table that shows the percentage of correct, incorrect and do not know answers.
I want it to look like this:
Question1 | Question2 | Question3 | |
Correct | 40% | 50% | 60% |
Incorrect | 40% | 30% | 30% |
Do not know | 20% | 20% | 10% |
How do I do this? I know that I have to generate new variables for Correct, Incorrect and Do not know. I already thought of categorical variables which I generated like this for the first question, assume that option 1 was the correct answer:
gen Question1_1 = .
replace Question1_1 = 1 if Question1==1
replace Question1_1 = 2 if Question1 >1 & <4
replace Question1_1 = 3 if Question1==4
This more or less gives me what I want for one question, but I have no idea how I can get this for all of my questions to show up in one table.
Maybe anyone can help me out.
Thank you in advance,
Phi Dil
0 Response to Table with the Percentage of correct Answers
Post a Comment