Downloading STA data into STATA

 

Tutorial demonstrating how to load STA data for use in STATA.

1. In SDA

 

 

 

 

 

2. Open the Stata file in a Text Editor (Word Pad in PCs or Text Edit in Macs)

 

2.1 From the beginning to the dictionary line, cut and paste into a new document in a text editor and save as .do (e.g. statafile.do or syntax.do)

 

 

2.2 From the dictionary line all the way to the bottom, cut and past into a new document in a text editor and save as .dct (e.g. statafile.dct or syntax.dct)

 

2.3 Open the .dct file with the text editor and replace Y with the full path in double quotes to your data file (e.g. "C\full path\datafile.txt") and save it

 

2.4 Open the .do file with the text editor and replace X with the full path to your .dct file (e.g. "C\full path\statafile.dct") and save it

 

3. Start Stata

 

3.1 Click on File → Import → ASC II with format dict. → browse for .dct and Datafile.txt

 

3.2 Save your file as a system file (.dta)

Submitted by estherkim on Mon, 12/02/2013 - 13:14

Utilities: