MEIRU Microdata Portal
  • Home
  • Overview
  • Microdata Catalog
  • Citations
  • Login
    Login
    Home / Central Data Catalog / MWI-MEIRU-TB-COMBINE-FINAL-2022-V01 / variable [V223]
central

TB cases (1974-2018) and controls (1998-2018) analytical dataset (Karonga)

Malawi
Get Microdata
Reference ID
MWI-MEIRU-TB-COMBINE-FINAL-2022-v01
Producer(s)
Mia Crampin, Estelle McLean
Collections
Karonga -District-wide Combined / Harmonized Datasets Karonga HDSS
Metadata
Documentation in PDF DDI/XML JSON
Created on
Nov 14, 2025
Last modified
Nov 15, 2025
Page views
24948
Downloads
151
  • Study Description
  • Data Dictionary
  • Downloads
  • Get Microdata
  • Data files
  • combined_tb_cases_controls_final

Date treatment started [date] [wide] (D) (ctrtdate4)

Data file: combined_tb_cases_controls_final

Overview

Valid: 5
Type: Discrete
Start: 1011
End: 1020
Width: 10
Range: -
Format: character

Questions and instructions

Literal question
Date treatment started [date] [wide]

Imputation and derivation

Derivation
variable: trtest [decade estimate of contact treatment start date] (table[s]: tb_contact, tb_contactto2007, tbold_contact)
variable: trtmm [month of contact treatment start date] (table[s]: tb_contact, tb_contactto2007, tbold_contact)
variable: trtyear [year of contact treatment start date] (table[s]: tb_contact, tb_contactto2007, tbold_contact)
variable: trtdate [date of contact treatment start date] (table[s]: tb_contact, tb_contactto2007, tbold_contact)

<the exposure contacts are processed separately first:>
replace trtyear=1905 if trtest==2
replace trtyear=1915 if trtest==3
replace trtyear=1925 if trtest==4
replace trtyear=1935 if trtest==5
replace trtyear=1945 if trtest==6
replace trtyear=1955 if trtest==7
replace trtyear=1965 if trtest==8
replace trtyear=1975 if trtest==9
replace trtyear=1985 if trtest==10
replace trtyear=1995 if trtest==11
recode trtyear 9999=.
gen trtdate=mdy(trtmm,15,trtyear) if trtmm~=. & trtyear~=.
replace trtdate=mdy(6,15,trtyear) if trtmm==. & trtyear~=.reshape wide idcontac famcont contvil contplace trtdate trtdatex trtplace certtbcon wardvisit relship contaccon cough nurseill houseill sleepill contacind contaclong contacdays, i(ident frm_intdate) j(n)
rename * c*
rename (cident cidcontac* cfrm_intdate cnumtbcont) (ident idcontac* intdate numtbcont)
save ${tempfiles}\tbcontacts_wide, replace
<and then merged into the main file:>
merge m:1 ident intdate using ${tempfiles}\tbcontacts_wide, keep(master match) nogen
Back to Catalog
MEIRU Microdata Portal

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