EpiData to Stata

EpiData is commonly used by researchers all over the world for data entry. Stata is used commonly for data analysis. EpiData can export to Stata directly with labels preserved.

However there are issues with the width of the variable and value labels

Following code will help !

// Epidata to stata foreach var of varlist * { local diformat : label (`var') maxlength if `diformat'>0 { format `var' %`diformat'.0g } }

This should take care of majority of formatting errors.