Coding missing or dots (.) in STATA [message #20361] |
Mon, 26 October 2020 09:38 |
shujaat.smc@gmail.com
Messages: 75 Registered: July 2020
|
Senior Member |
|
|
Dear DHS Representative,
I have a question about the following Stata command that I copied from Git-Hub;
//tetnaus toxoid injections
recode m1_1 (0 1 8 9 . = 0 "no") (1/7 = 1 "yes"), gen(rh_anc_toxinj)
recode m1_1 (0 1 8 9 . = 0 "No") (1/7 = 1 "Yes"), gen(rh_anc_toxinj)
replace rh_anc_toxinj = . if age>=period
label var rh_anc_toxinj "Received 2+ tetanus injections during last pregnancy"
Q; Is this is permissible that labeling the dots (.) which stata shows as "missing" in its codebook command, that we assign the value of zero since zero in many cases is code by the researcher for the reference category. Therefore using zero for dots (.)
is like having response No from the participants in the survey even though most of them either not answered a particular question or the question was skipped according to the questionnaire tools.
Q; In one of the responses I got on the DHS forum was to code dots as "." (how this coding works in stata) since despite using this code if we tab newly generated variable still it shows missing observation in it similar to parent variable.
Waiting for your reply.
Best Regards
Dr. Hussain
|
|
|
|
|
|
|