The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » General » generating a new variable
generating a new variable [message #15440] Thu, 19 July 2018 14:21 Go to next message is currently offline
Messages: 8
Registered: July 2018
if i am generating a new variable using egen that is the acceptance of violence by mixing the five conditions under which violence is accepted so: egen acceptance_of_violence anymatch(v744a v744b v744c v744d v744e), values(1), is this command enough or do i have to remove the missing values also? if i do, how do i deal with the missing values? and for the seeking help variable is 1 coded for seeking help and 0 not for seeking help?
Re: generating a new variable [message #15452 is a reply to message #15440] Mon, 23 July 2018 14:13 Go to previous message
Messages: 1516
Registered: February 2013
Senior Member
A response from Data Processing Expert, Mr. Guillermo Rojas:

It is probably good to check first if all the intervening variables have a missing value. If that is the case the new variable should be assigned missing. If at least one of the variables have a value different of missing then use code 1 to construct the desired variable.
Previous Topic: Combining twins into single delivery events
Next Topic: ever married sample
Goto Forum:

Current Time: Fri Aug 12 06:00:38 Coordinated Universal Time 2022