Generating spousal education difference [message #10536] |
Thu, 04 August 2016 07:31 |
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 |
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
|
|
|
|