MEIRU Microdata Portal
  • Home
  • Overview
  • Microdata Catalog
  • Citations
  • Login
    Login
    Home / Central Data Catalog / MWI-MEIRU-SPOUSELINKS-2002-V01 / variable [V80]
central

Cleaned spouse and marriage data

Malawi
Get Microdata
Reference ID
MWI-MEIRU-SPOUSELINKS-2002-v01
Producer(s)
Professor Amelia (Mia) Crampin
Collections
Karonga HDSS Combined / Harmonized Datasets
Metadata
Documentation in PDF DDI/XML JSON
Created on
Nov 14, 2025
Last modified
Nov 19, 2025
Page views
6821
Downloads
108
  • Study Description
  • Data Dictionary
  • Downloads
  • Get Microdata
  • Data files
  • all_marital_reports
  • all_spouse_pairs_clean_summarised
  • all_spouse_pairs_full
  • marital_status_episodes

Last known date husband alive (D) (h_lastalive)

Data file: all_spouse_pairs_full

Overview

Valid: 195687
Type: Discrete
Start: 129
End: 138
Width: 10
Range: -
Format: character

Description

Definition
Last known date husband alive

Imputation and derivation

Derivation
variable: stepdate (table[s]: crs_residency_episodes_clean_poly [derived table])
variable: idmoth (table[s]: parents_lafd [derived table])
variable: idfath (table[s]: parents_lafd [derived table])
variable: m_lastAC (table[s]: parents_lafd [derived table])
variable: m_firstDC (table[s]: parents_lafd [derived table])
variable: f_lastAC (table[s]: parents_lafd [derived table])
variable: f_firstDC (table[s]: parents_lafd [derived table])
variable: event_date (table[s]: indices])
variable: adl (table[s]: indices])

<vital status for people is summarised from indices, crs data and reports of parental status, these are then merged into the main dataset for wives and husbands>
use ${gendata}\crs_residency_episodes_clean_nopoly, clear
bys ident: egen lastincrs=max(stopdate)
bys ident (stopdate): gen laststop=stoptype[_N]
format %td lastincrs
keep ident lastincrs laststop
duplicates drop
gen crs=1
save ${tempfiles}\allcrsmembers, replace
gen adl=1 if laststop==1 | laststop==4
replace adl=2 if laststop==2
rename lastincrs intdate
save ${tempfiles}\adlcrs, replace

*get listing of last alive and death dates from parents
use idmoth idfath m_lastAC m_firstDC f_lastAC f_firstDC using ${gendata}\parents_lafd, clear
expand 2, gen(exp)
drop if idmoth=="" & idfath==""
gen ident=idmoth if exp==0
replace ident=idfath if exp==1
gen lastA=m_lastAC if exp==0
replace lastA=f_lastAC if exp==1
gen firstD=m_firstDC if exp==0
replace firstD=f_firstDC if exp==1
keep ident lastA firstD
drop if ident==""
duplicates drop
save ${tempfiles}\parslafd, replace
*add in data from indices
use ${newstata}\indices, clear
replace intdate=event_date if event_date~=.
append using ${tempfiles}\adlcrs
expand 2 if adl==2, gen(exp)
replace adl=1 if exp==1
keep ident adl intdate
drop if adl>=3
bys ident adl: egen lastA=max(intdate) if adl==1
bys ident adl: egen firstD=min(intdate) if adl==2
append using ${tempfiles}\parslafd
bys ident: egen lastalive=max(lastA)
bys ident: egen firstdead=min(firstD)
keep ident lastalive firstdead
format %td lastalive firstdead
replace firstdead=. if lastalive>firstdead & lastalive~=.
duplicates drop
save ${tempfiles}\indices_lafd, replace
Back to Catalog
MEIRU Microdata Portal

© MEIRU Microdata Portal | admin@meirudata.mw | All Rights Reserved | Register