-
Notifications
You must be signed in to change notification settings - Fork 0
/
tup_quiz_grading.do
226 lines (188 loc) · 7.74 KB
/
tup_quiz_grading.do
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
clear
set more off
log close _all
/*****************
Description:
TUP endline enumerator training Quiz grading
*****************/
global USER "Ryan McWay"
local date `c(current_date)'
local time `c(current_time)'
local home "<local>"
//***** All paths should be relative so that all you need to change is `home' and $USER in order to run the dofile.
cd "`home'"
local input "`home'\input"
local edit "`home'\edit"
local output "`home'\output"
**************************************************************************
display "Analysis run by $USER at `date' and `time'"
**************************************************************************
//********** Day 2 Quiz
do "`home'\scripts\import_tup_quiz.do"
foreach v of varlist duration project q_section2 q_section3 q_section5_acres q_section5 q_section11{
destring `v', replace
}
replace name = strproper(name)
drop if name == "Ryan" | name == "Mutebi Ronald" | name == "Agatha Nakidde"
gen id = .
replace id = 1 if name == "Duchu Henry"
replace id = 2 if name == "Bukirwa Rebecca"
replace id = 3 if name == "Wanna Sarah"
replace id = 4 if name == "Malengo Douglas"
replace id = 5 if name == "Namutamba Esther"
replace id = 6 if name == "Nakidde Agatha"
replace id = 7 if name == "Charles Mulondo"
replace id = 8 if name == "Ismail Musana"
replace id = 9 if name == "Namatovu Bukenya Harriet"
replace id = 10 if name == "Waiswa Jimmy"
replace id = 11 if name == "Oundo Joseph"
replace id = 12 if name == "Steven"
replace id = 13 if name == "Aheebwa Aishah"
replace id = 15 if name == "Nsubuga Paul"
replace id = 16 if name == "Kanyemera Fridah"
replace id = 17 if name == "Namatovu Catherine"
replace id = 18 if name == "Namugoya Susan"
replace id = 19 if name == "Nevis Bukirwa"
replace id = 20 if name == "Shamim Nalukenge"
replace id = 21 if name == "Lydia"
replace id = 22 if name == "Chloe"
replace id = 23 if name == "Nalubwama"
replace id = 24 if name == "Nantume"
replace id = 25 if name == "David"
replace id = 26 if name == "Apio"
replace id = 27 if name == "Ahimbisibwe"
replace id = 28 if name == "Omiat"
replace id = 29 if name == "Shafik"
replace id = 30 if name == "Nabukeera"
replace id = 31 if name == "Juliet"
replace id = 32 if name == "Nayiga"
replace id = 33 if name == "Prossie"
replace id = 34 if name == "Moses"
replace id = 35 if name == "Awachango"
replace id = 36 if name == "Wafula"
duplicates drop id, force
egen score_d2 = rowmean(project q_section2 q_section3 q_section5_acres q_section5 q_section11)
sum project q_section2 q_section3 q_section5_acres q_section5 q_section11 score_d2
list name if score_d2 == 1
/*********
NOTES:
Would be easier for merge if we already had everyones name in a mult choice selection, then could just match on #.
Section 11 was very difficult for people
*********/
save "`edit'\tup_quiz_day2.dta", replace
**************************************************************************
//********** Day 3 Quiz
do "`home'\scripts\import_tup_quiz_day2.do"
drop if name == "RESEARCH PROJECT AND HELPING THE NEEDY"
gen id = .
replace id = 1 if name == "Duchu henry"
replace id = 2 if name == "Bukirwa Rebecca"
replace id = 3 if name == "Wanga sarah" | name == "Wanga Sarah"
replace id = 4 if name == "Malengo Douglas"
replace id = 5 if name == "Namutamba Esther"
replace id = 6 if name == "Nakidde Agatha"
replace id = 7 if name == "Charles Mulondo"
replace id = 8 if name == "Ismail musana"
replace id = 9 if name == "Namatovu Bukenya Harriet"
replace id = 10 if name == "Waiswa jimmy"
replace id = 11 if name == "Oundo joseph"
replace id = 12 if name == "Steven" | name == "Steven wakalo"
replace id = 13 if name == "Aheebwa Aishah"
replace id = 15 if name == "Nsubuga Paul"
replace id = 16 if name == "Kanyemera fridah"
replace id = 17 if name == "Namatovu Catherine"
replace id = 18 if name == "Namugoya Susan"
replace id = 19 if name == "Nevis bukirwa"
replace id = 20 if name == "Shamim nalukenge"
replace id = 21 if name == "Namwanza lydia"
replace id = 22 if name == "Chloepatra Nakato"
replace id = 23 if name == "Nalubwama Christine"
replace id = 24 if name == "Nantume Flavia"
replace id = 25 if name == "David Baidu"
replace id = 26 if name == "Apio Florence"
replace id = 27 if name == "Ahimbisibwe Daisy"
replace id = 28 if name == "Omiat Samuel"
replace id = 29 if name == "Shafik Kikomeko"
replace id = 30 if name == "NABUKEERA WINFRED"
replace id = 31 if name == "Juliet Musiime"
replace id = 32 if name == "Nayiga sylvia"
replace id = 33 if name == "Prossy Nakiyimba"
replace id = 34 if name == "Moses Semujju"
replace id = 35 if name == "Awachango Annette"
replace id = 36 if name == "Wails protus"
duplicates drop id, force
replace name = strproper(name)
egen score_d3 = rowmean(sect2 sect4 sect5_1 sect5_2 sect5_3 sect11)
sum sect2 sect4 sect5_1 sect5_2 sect5_3 sect11 score_d3
list name if score_d3 == 1
/*********
NOTES:
Not very good at all!
Sect4 and sect5_3 were just awful.
Need improvement on sect2 and sect5_2
*********/
save "`edit'\tup_quiz_day3.dta", replace
**************************************************************************
//********** Day 4 Quiz
do "`home'\scripts\import_tup_quiz_day4.do"
replace name = strproper(name)
gen id = .
replace id = 1 if name == "Duchu Henry"
replace id = 2 if name == "Bukirwa Rebecca"
replace id = 3 if name == "Wanga Sara"
replace id = 4 if name == "Malengo Douglas"
replace id = 5 if name == "Namutamba Esther"
replace id = 6 if name == "Nakidde Agatha"
replace id = 7 if name == "Charles Mulondo"
replace id = 8 if name == "Ismail Musana"
replace id = 9 if name == "Namatovu Bukenya Harriet"
replace id = 10 if name == "Waiswa Jimmy"
replace id = 11 if name == "Oundo Joseph"
replace id = 12 if name == "Steven Wakaalo"
replace id = 13 if name == "Aheebwa Aisha"
replace id = 15 if name == "Nsubuga Paul"
replace id = 16 if name == "Kanyemera Fridah"
replace id = 17 if name == "Namatovu Catherine"
replace id = 18 if name == "Namugoya Susan"
replace id = 19 if name == "Nevis Bukirwa"
replace id = 20 if name == "Shamim Nalukenge"
replace id = 21 if name == "Namwanza Lydia"
replace id = 22 if name == "Chloepatra Nakato"
replace id = 23 if name == "Nalubwama Christine"
replace id = 24 if name == "Nantume Flavia"
replace id = 25 if name == "David Baidu"
replace id = 26 if name == "Apio Florence"
replace id = 27 if name == "Daisy Ahimbisibwe"
replace id = 28 if name == "Samuel Omiat"
replace id = 29 if name == "Shafik Kikomeko"
replace id = 30 if name == "Nabukeera Winfred"
replace id = 31 if name == "Juliet Musiime"
replace id = 32 if name == "Nayiga Sylvia"
replace id = 33 if name == "Nakiyimba Prossy"
replace id = 34 if name == "Moses Semujju"
replace id = 35 if name == "Awachango Annette"
replace id = 36 if name == "Wails Protus"
duplicates drop id, force
egen score_d4 = rowmean(section3 section4 section6 section8 section10 section11 vsla1 vsla2 vlsa3 vlsa4)
sum section3 section4 section6 section8 section10 section11 vsla1 vsla2 vlsa3 vlsa4
list name if score_d4 == 1
/*********
NOTES:
None. No better no worse!
*********/
save "`edit'\tup_quiz_day4.dta", replace
**************************************************************************
//*********** Merge, Total Score and Rank
merge m:m id using "`edit'\tup_quiz_day2.dta", keepusing(score_d2 name id)
drop _merge
merge m:m id using "`edit'\tup_quiz_day3.dta", keepusing(score_d3 name id)
drop _merge
foreach v of varlist score_d2 score_d3 score_d4{
recode `v' (. = 0)
}
egen tot_score = rowmean(score_d2 score_d3 score_d4)
egen ranking = rank(tot_score), field
order ranking name tot_score
sort ranking
list ranking name tot_score
save "`edit'\tup_quiz_master.dta", replace