Could you please help me to present vignettes in a tabular format rather than a running text?
Code:
use setup, clear gen phrase_A1 = "error" replace phrase_A1 = "male" if gender ==1 replace phrase_A1 = "female" if gender ==2 gen phrase_A2 = "error" replace phrase_A2 = "yes at the employer's premises" if experience_and_internship ==1 replace phrase_A2 = "yes, but in a different firm" if experience_and_internship ==2 replace phrase_A2 = "no" if experience_and_internship ==3 gen phrase_A3 ="error" replace phrase_A3 ="Omani" if nationality == 1 replace phrase_A3 ="non-Omani" if nationality == 2 gen phrase_A4 = "error" replace phrase_A4 = "leading university in Oman" if place_of_study ==1 replace phrase_A4 = "non-leading university in Oman" if place_of_study ==2 replace phrase_A4 = "leading university in Oman" if place_of_study ==3 replace phrase_A4 = "non-leading university abroad" if place_of_study ==4 gen phrase_A5 = "error" replace phrase_A5 = "College Diploma" if level_of_education ==1 replace phrase_A5 = "College Higher Diploma" if level_of_education ==2 replace phrase_A5 = "Bachelor" if level_of_education ==3 replace phrase_A5 = "masters" if level_of_education ==4 gen phrase_A6 = "error" replace phrase_A6 = "Engineering" if field_of_study ==1 replace phrase_A6 = "Business and Management" if field_of_study ==2 replace phrase_A6 = "Inforamtion and Technology" if field_of_study ==3 gen phrase_A7 = "error" replace phrase_A7 = "high" if grade ==1 replace phrase_A7 = "fair" if grade ==2 replace phrase_A7 = "low" if grade ==3 gen phrase_A8 = "error" replace phrase_A8 = "yes" if extra_curricular_activities ==1 replace phrase_A8 = "no" if extra_curricular_activities ==2 gen phrase_A9 = "error" replace phrase_A9 = "yes by an exisiting employee" if referred ==1 replace phrase_A9 = "yes through school-linkages" if referred ==2 replace phrase_A9 = "no" if referred ==3 assert phrase_A1 ~= "error" assert phrase_A2 ~= "error" assert phrase_A3 ~= "error" assert phrase_A4 ~= "error" assert phrase_A5 ~= "error" assert phrase_A6 ~= "error" assert phrase_A7 ~= "error" assert phrase_A8 ~= "error" assert phrase_A9 ~= "error" gen vigA = phrase_A1 + phrase_A2 + phrase_A3 + phrase_A4 + phrase_A5 + phrase_A6 + phrase_A7 + phrase_A8 + phrase_A9
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float id_quest byte(vignr deck) float(id_vignette gender experience_and_internship field_of_study) 1 1 11 105 1 2 1 1 2 11 102 2 1 3 1 3 11 109 2 2 2 1 4 11 110 2 2 2 1 5 11 108 1 1 3 1 6 11 101 1 1 1 1 7 11 104 2 3 2 1 8 11 103 2 3 2 1 9 11 107 1 2 3 1 10 11 106 1 2 3 2 1 13 125 1 2 1 2 2 13 128 2 3 1 2 3 13 130 1 2 2 2 4 13 126 2 3 2 2 5 13 129 2 3 1 2 6 13 124 1 3 3 2 7 13 121 2 3 1 2 8 13 123 2 2 1 2 9 13 127 1 2 1 2 10 13 122 1 1 2 3 1 19 184 1 2 1 3 2 19 188 2 3 1 3 3 19 181 1 3 2 3 4 19 183 2 2 3 3 5 19 189 2 1 1 3 6 19 186 2 2 3 3 7 19 182 2 2 1 3 8 19 190 2 3 2 3 9 19 185 2 1 1 3 10 19 187 2 3 2 4 1 4 40 1 3 2 4 2 4 37 2 3 1 4 3 4 35 2 1 1 4 4 4 36 1 3 1 4 5 4 39 1 3 1 4 6 4 31 1 2 1 4 7 4 32 1 3 3 4 8 4 38 2 2 3 4 9 4 33 1 3 3 4 10 4 34 1 3 3 5 1 12 111 1 1 3 5 2 12 115 2 1 3 5 3 12 117 1 2 3 5 4 12 120 2 1 1 5 5 12 116 1 1 3 5 6 12 119 1 1 3 5 7 12 113 1 1 3 5 8 12 112 1 3 3 5 9 12 118 1 2 2 5 10 12 114 1 2 3 6 1 5 41 1 3 2 6 2 5 44 1 2 1 6 3 5 43 2 1 2 6 4 5 46 1 2 3 6 5 5 42 2 2 1 6 6 5 50 1 2 2 6 7 5 48 1 1 2 6 8 5 49 1 1 3 6 9 5 47 2 2 2 6 10 5 45 2 3 1 7 1 7 69 1 2 2 7 2 7 66 2 3 2 7 3 7 63 2 3 1 7 4 7 67 2 2 3 7 5 7 64 2 3 2 7 6 7 62 1 3 3 7 7 7 70 1 1 1 7 8 7 68 2 2 3 7 9 7 65 1 3 3 7 10 7 61 1 3 3 8 1 17 165 1 2 1 8 2 17 170 2 3 1 8 3 17 167 1 3 1 8 4 17 166 1 3 2 8 5 17 168 2 2 2 8 6 17 161 2 1 2 8 7 17 163 1 1 1 8 8 17 164 1 2 3 8 9 17 169 1 3 3 8 10 17 162 2 2 2 9 1 8 75 1 2 1 9 2 8 76 1 1 1 9 3 8 73 2 1 1 9 4 8 79 2 2 1 9 5 8 72 2 3 2 9 6 8 80 1 3 3 9 7 8 71 2 3 3 9 8 8 74 2 1 2 9 9 8 77 1 1 2 9 10 8 78 2 1 2 10 1 15 143 2 2 2 10 2 15 147 2 3 1 10 3 15 149 2 3 2 10 4 15 144 1 2 3 10 5 15 141 1 1 1 10 6 15 145 1 1 3 10 7 15 150 1 1 3 10 8 15 146 2 3 3 10 9 15 142 1 3 2 10 10 15 148 1 3 1 end label values gender gender label def gender 1 "male", modify label def gender 2 "female", modify label values experience_and_internship experience_and_internship label def experience_and_internship 1 "yes at the employer's premises", modify label def experience_and_internship 2 "yes, but in a different firm", modify label def experience_and_internship 3 "no", modify label values field_of_study field_of_study label def field_of_study 1 "Engineering", modify label def field_of_study 2 "Business and Management", modify label def field_of_study 3 "Inforamtion and Technology", modify
I want a table like this:
table 1:
gender | male |
experience and internship | no |
field of study | engineering |
0 Response to How to present vignettes in a tabular format
Post a Comment