The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » General » Generating spousal education difference
Generating spousal education difference [message #10536] Thu, 04 August 2016 07:31 Go to next message
Lorretta is currently offline  Lorretta
Messages: 8
Registered: August 2013
Location: Nigeria
Member
I want to generate the following categories of spousal education difference using couples recode: husband better educated, wife better educated, both equally educated, Neither educated. How do I get the categories - both equally educated and neither educated. Thanks.

Lorretta
Re: Generating spousal education difference [message #10540 is a reply to message #10536] Thu, 04 August 2016 12:27 Go to previous messageGo to next message
Liz-DHS
Messages: 1516
Registered: February 2013
Senior Member
Dear User,
A response from Senior Technical Specialist. Dr. Tom Pullum:
Quote:

You need to use the CR file for this purpose. Here is an example, using NGCR6AFL.dta (the couples file from the Nigeria 2013 survey:
lookfor education
label list V106
tab v106 mv106,m

gen ed_diff=. 

replace ed_diff=3 if v106==mv106
replace ed_diff=2 if v106>mv106
replace ed_diff=1 if v106<mv106
replace ed_diff=0 if v106==0 & mv106==0

label variable ed_diff "H and W ed level"
label define ed_diff 0 "Both have none" 1 "H>W" 2 "W>H" 3 "Same but not none"
label values ed_diff ed_diff

tab v106 mv106, summarize(ed_diff) means
tab ed_diff


Re: Generating spousal education difference [message #10550 is a reply to message #10540] Fri, 05 August 2016 07:31 Go to previous message
Lorretta is currently offline  Lorretta
Messages: 8
Registered: August 2013
Location: Nigeria
Member
Thanks.

Lorretta
Previous Topic: 12 Month Contraceptive Discontinuation - Rwanda
Next Topic: Negotiation of sexual activity variables in 2012 Indonesia DHS
Goto Forum:
  


Current Time: Fri Aug 19 23:15:18 Coordinated Universal Time 2022