Introduction {#Sec1}
============

The International Network for the Demographic Evaluation of Populations and their Health (INDEPTH) was founded in 1998 and represents a group of currently 47 Health and Demographic Surveillance System (HDSS) sites located in 18 low- and middle-income countries in Africa, Asia and the Pacific. Following its establishment, the Network has endeavoured to build a standardised set of data management protocols pertaining to HDSS data \[[@CR1]\]. One of the key challenges of HDSS data management relates to the effective and efficient means of storing and maintaining longitudinal data on health, socio-economic and demographic dynamics that are prospectively updated within a geographically-defined population. These longitudinal datasets capture the dynamic sets of events and episodes pertaining to every individual and household under surveillance (including migration into and out of the demarcated HDSS area). They require sound database structures and protocols for data management and storage. The HDSS platforms form the backbone for high-quality data analysis for scientific enquiry and embedding research projects.

One of the research priorities of the INDEPTH Network is to facilitate comparative demographic analyses across HDSSs. The Multi-centre Analysis of the Dynamics of Internal Migration And Health (MADIMAH) is an INDEPTH project that commenced in 2011 with the aim of producing a set of comparative analyses across HDSSs on questions concerning migration and health \[[@CR2]\]. The first phase of MADIMAH involved a study of migration, urbanisation and human capital using datasets from eight HDSSs in Burkina Faso, Kenya, South Africa and Mozambique \[[@CR3]\]. Thereafter, a multi-centre study examining the migration effect on mortality across nine sub-Saharan African HDSSs was conducted \[[@CR4]\]. These studies illustrate the use of standardised longitudinal data management and harmonization of HDSS data across multiple centres. They further illustrate the scientific potential that may be realised by following a uniform analytical framework to produce a comparative set of results across different locations. The objective of this research note is to introduce a training manual for event history data management which proposes a set of versatile procedures aimed at producing standard data structures for use in longitudinal event history analysis (EHA).

Main text {#Sec2}
=========

Data {#Sec6}
----

The INDEPTH iSHARE2 data repository[1](#Fn1){ref-type="fn"} went online in 2014 and provides a unique resource of high-quality, fully documented HDSS longitudinal datasets available for download to a wide range of users, including HDSS-linked scientists and analysts, researchers and students \[[@CR5]\]. The repository, which is growing over time, holds amongst others, core micro datasets describing the key demographic events of more than 25 HDSS populations and unique data on cause specific mortality \[[@CR5]\]. Recently, the first of a series of multi-centre core micro datasets attached to the MADIMAH project has been released and is structured to examine determinants of in- and out-migration, particularly the education status of the migrant \[[@CR6]\].

Methods {#Sec7}
-------

The efficient use of these micro datasets requires that users are able to handle HDSS data structures (such as the residency episode files) and understand the range of core events that alter residency status in the HDSS, especially, in- and out-migration, births and deaths. These data structures and properties form the necessary foundation for the statistical analyses of population dynamics. In order to address these requirements, the MADIMAH group developed a manual based on the group's experiences of conducting comparative analyses across multiple HDSS sites, and of training HDSS data scientists and analysts in these methods. The intention was to provide data managers and analysts who manage raw questionnaire data with a step-by-step description of the process of structuring and preparing a dataset for the calculation of demographic rates and EHA. The approach was to create a common language and set of codes that can create synergies and enable communication across larger communities of data managers and analysts working with longitudinal research designs.

Results: training manual {#Sec3}
------------------------

The training manual is available on-line as Additional file [1](#MOESM1){ref-type="media"} to this note. It provides a general introduction to event history data management. The manual leads the user through all the procedures necessary to format and analyse longitudinal data. It demonstrates how to create a core residency file suitable for EHA and how to check for inconsistencies in the data. The approach is flexible and covers the calculation of basic demographic rates, as well as more complex determinants analysis through the addition of individual and household attributes. The manual illustrates how to enrich the database with new events with precise or imputed dates of occurrence. Finally, the manual explains how to create duration events of several types. The methods outlined in the manual are implemented in detailed coding using Stata software. All sections start with an example of an output file, followed by a check-list and conclude with further examples or programmes needed to solve specific technical issues. Longer, more detailed Stata programmes are available in Additional file [1](#MOESM1){ref-type="media"}: Appendix.

This manual is the first comprehensive guide to HDSS longitudinal data management and has become a standard for INDEPTH member HDSS Centres. It can be implemented on longitudinal data from other sources, including register-based, retrospective, or cohort data. It forms the first part of a two-part series. The second manual will guide analysts through the computation of demographic rates and the analysis of determinants and outcomes of demographic processes, using the longitudinal dimension in the data.

Limitations {#Sec5}
===========

The procedures outlined in the training manual are most comprehensively applied to HDSS data because these data are inclusive of all entry and exit events in a geographically defined population. In other data sources some entry or exit events might not be relevant, e.g. in-migration for cohort data, or death for retrospective data. Nonetheless, the procedures described in this manual will remain valid and only minor changes to the programming codes will be necessary to apply these methods to such study designs.

Additional file {#Sec25}
===============

**Additional file 1.** Manual of event history data management using HDSS data.

INDEPTH

:   International Network for the Demographic Evaluation of Populations and their Health

HDSS

:   Health and Demographic Surveillance System

EHA

:   event history analysis

MADIMAH

:   Multi-centre Analysis of the Dynamics of Internal Migration And Health

<http://www.indepth-ishare.org/index.php/home>.

**Electronic supplementary material**

The online version of this article (doi:10.1186/s13104-017-2541-9) contains supplementary material, which is available to authorized users.

PB conceptualised the methods and processes outlined in the manual and was a major contributor in writing the manual. CG reviewed and checked the methods and processes outlined in the manual and edited and contributed to the writing of the manual and research note. KH contributed to the conceptualisation of methods outlined in the training manual and contributed to the research note. OS provided INDEPTH team leadership and contributed to the research note. MC contributed to the conceptualisation of methods outlined in the manual, provided MADIMAH team leadership, and contributed to the manuscript. All authors read and approved the final manuscript.

Acknowledgements {#FPar1}
================

We acknowledge institutional support from the School of Public Health, Faculty of Health Sciences, University of the Witwatersrand, South Africa; Centre de Recherche en Démographie et Sociétés, Université Catholique de Louvain, Louvain-la-Neuve, Belgium; and the African Population and Health Research Centre, Nairobi, Kenya, as critical bases for the MADIMAH project leadership.

Competing interests {#FPar2}
===================

The authors declare that they have no competing interests.

Funding {#FPar3}
=======

The INDEPTH Multi-centre Analysis of the Dynamics of Internal Migration And Health (MADIMAH) project has received funds from the Swedish International Development Agency (Sida: 2012-000379) The research has received a joint financial support from the National Research Foundation, South Africa, and the Wallonia‐Brussels Federation of Belgium (Grant No: 95284). We gratefully acknowledge the South African Medical Research Council (SAMRC) for funding Carren Ginsburg's Career Development Award.

Publisher's Note {#FPar4}
================

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
