[EpiData-list] Importing from Stata - problems with labels and comment legal

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Tue Nov 30 10:58:46 CST 2004


The reason for problems of importing Stata files with defined value labels 
can be that in Stata one can attach a label like:
1 female
2 male

to a real variable. e.g. #.####

But in EpiData this would mean that the legal value should be:
1.0000 female
2.0000 male

So to avoid this before saving the data file in Stata do this:
a. read the file (use yourfile)
b. compact the file (compress)
c. save the file (save newfile)

Then you can import the file into epidata and use the labels as defined 
with 1 for female and 2 for male.
Alternatively you can import the first file into EpiData and then make a 
qes file from the recfile and remove the decimals from that variable.

regards Jens Lauritsen
The EpiData Association,                   (EpiData Foreningen)




More information about the EpiData-list mailing list