HOW TO CONVERT 


about Epidemiology & the department

Epidemiology academic information

Epidemiology faculty

Epidemilogy resources

sites of interest to Epidemiology professionals



Last Updated

04 Apr 2005

Four steps to convert Epi Info data to Stata format

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 (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 the MS-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:
    1. 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