Re: HONDURAS 2011-2 [message #10236 is a reply to message #10210] |
Tue, 12 July 2016 11:04 |
Bridgette-DHS
Messages: 3230 Registered: February 2013
|
Senior Member |
|
|
Following is a response from Senior DHS Stata Specialist, Tom Pullum:
The term "merge" refers to matching two files, case by case. What you want to do is a construction of a new variable, within a single file, often called a "recode".
You start with a command such as "tab v233 v228, m". You then decide how do classify the cases in this table. Here is one possibility:
gen sb=0
replace sb=1 if v228==1 & v233>4 & v233<.
label variable sb "likely stillbirth"
tab sb
Here the "0" value includes all the women who (you believe) did not have a stillbirth, including women who never had any pregnancies at all. You may want to modify this construction.
There are many variations on the recode procedure. You can find out more with "help gen" and "help recode".
|
|
|