HOW TO CONVERT EPIINFO TO STATA



This instruction is for persons doing Rapid Surveys who are using the epi2dct.exe program to convert data entered in EpiInfo to the format used in Stata. The instructions were written in 2005, so the example features EpiInfo, Version 6 and Stata, Version 8, at use during that year.

FOUR STEPS TO CONVERT EPIINFOR DATA TO STATA FORMAL

First

  • Save the epi2dct.exe program in the same directory as Stata (i.e., C:\Stata8). Unpack the compressed epi2dct.exe file by using  Winzip or some other zip program. 
  • Assume your Epi Info data file is named epi1.rec (DOS version of Epi Info). Your intention is to convert epi1.rec to epi1.dta (a Stata file). Note: the file name (i.e., the portion before the extension [epi1]) cannot be longer than 8 letters or numbers, and there can be no spaces. 
  • If your Epi Info file is named epi1.mdb (i.e., the Windows version of Epi Info), then you will first need to convert it to epi1.rec.  To do so, use the Write (Export) command of Epi Info (Windows), setting Output Formats to EPI6, and listing the file name as epi1.rec.

Second

  • Go to theMS-DOS prompt in the Windows Start menu.  If Windows XP, the prompt is in the Accessories section of the All Programs menu as .
  • Enter the following, assuming that both epi2dct.exe and epi1.rec are in the Stata directory:

cd\Stata8 followed by [enter]

C:>\Stata8\epi2dct epi1.rec epi1.dct

Third

  • Move the file to c:\Stata8\data\ (the subdirectory where the Stata program looks for new data)
  • To read the data from the Stata windows, enter:

infile using epi1.dct

or

if epi1.dct in another directory, enter:

infile using c:/Stata8/directory where file is located/ epi1.dct

Fourth

  • Save the data which were loaded into Stata as epi1.dta