I have primary dataset with 574 responses within which I wanted to perform descriptive statistics specifically for one topic in the questionnaire which has 8 questions and the answers are on likert scale from 1 to 5 (never, rarely, sometimes, often, every day). I have generated binary variable (never=0, remaining all=1) taking each question and then combined binary variable which has 442 observations (324=1, 118=0) . Now I wanted to analyse this subset of 442. I used code gen subsample=1 if var_bin==1. Obviously, I saw only 324 observations. Can someone please help me to get both observations.
tab var_bin
var_bin | Freq. Percent Cum.
------------+-----------------------------------
0 | 118 26.70 26.70
1 | 324 73.30 100.00
------------+-----------------------------------
Total | 442 100.00
dtable i.var1 i.var2 i.var3 if subsample==1
Summary
---------------------------------
N 324
var1
8-18 49 (15.6%)
19-29 24 (7.6%)
40-49 37 (11.8%)
50-59 55 (17.5%)
60-69 81 (25.8%)
70+ 68 (21.7%)
var2
Above 1k 111 (34.4%)
Below 1k 210 (65.0%)
No response 2 (0.6%)
var3
Above A level 156 (48.3%)
Below A level 167 (51.7%)
Can somebody please guide me through this to get all responses (442)
Thank you
tab var_bin
var_bin | Freq. Percent Cum.
------------+-----------------------------------
0 | 118 26.70 26.70
1 | 324 73.30 100.00
------------+-----------------------------------
Total | 442 100.00
dtable i.var1 i.var2 i.var3 if subsample==1
Summary
---------------------------------
N 324
var1
8-18 49 (15.6%)
19-29 24 (7.6%)
40-49 37 (11.8%)
50-59 55 (17.5%)
60-69 81 (25.8%)
70+ 68 (21.7%)
var2
Above 1k 111 (34.4%)
Below 1k 210 (65.0%)
No response 2 (0.6%)
var3
Above A level 156 (48.3%)
Below A level 167 (51.7%)
Can somebody please guide me through this to get all responses (442)
Thank you
Comment