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
|
|
|