Anika Ruisch Elowe’s Updates
Week 1 Analyst assignment
I finished the single entry assignment using Stata 14. I did not have much time this week, so I did not do the double entry. I also did not list the missing values of sex of child or whether they showed a card). I included my do file and log as well as the excel list of entries that would need to be double checked.
I've just looked at your .do file...it is very good. I would make a couple small comments.
You made great use of mdy() and local macros for looping and you commented your code so it was easy to follow.
In section 5 of the code, when the child purports to have a card, you checked their doses in a loop and listed those that were missing all card data for EACH dose...but that is going to result in a lot of legitimate records being listed. We aren't concerned if a child with a card is missing data for individual doses, because they may not have received that dose. We need, instead, to set a flag if they seem to be missing dates and ticks for ALL doses...and then list those.
Most students did what you did
Some students tried to do it with a very long Boolean OR statement x|y|z|q|r|s
Generally, it is my practice to make a new flag variable and then run a loop to clear (the flag if I find what I'm looking for). e.g.,
gen no_data_on_card = 1
foreach X in {
replace no_data_on_card = 0 if `X'_tick_card == 1
replace no_data_on_card = 0 if !missing(`X'_date_card_m)
replace no_data_on_card = 0 if !missing(`X'_date_card_d)
replace no_data_on_card = 0 if !missing(`X'_date_card_y)
}
list RI01 RI03 RI11 RI12 if RI27 == 1 & no_data_on_card == 1
This will list far fewer records than your code...and each of the ones it lists has a problem.
My only other comment is that although it was great for you to do those later checks inside a loop, your code doesn't 'list' which dose had the problem...or the problematic values...so that could be a place to add more detail to make the resulting list more useful.
Overall great job...your logic was sound and your syntax easy to read. Thanks.
Thank you Dale, I will try again!
Hi Anika...I have found your update here...I think you need to click on the community (left side of screen) Module A3 WHO Survey Scholar...and post your updates there. It is possible for a student to be in several modules at once and the space where you posted this is like your personal wall in facebook...it isn't specific to the course...I only found it by navigating to your page. I suggest you re-post over there so others can see your work, too. I'll look at it soon and give you feedback.