The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Error after using SELECT - "File does not contain dictionary"
Error after using SELECT - "File does not contain dictionary" [message #6782] Tue, 14 July 2015 17:39 Go to next message
jack26h
Messages: 2
Registered: July 2015
Member
Hi, my question is about what to do after using the SELECT tool. I'm working in Stata. I see the .dct and .do files with my selected variables. I've tried opening the .dct file using the command: "infile using C:\XXX.dct". I get the following error message: "file does not contain dictionary".

This is my first time working with a .dct file so appreciate your help.
Re: Error after using SELECT - "File does not contain dictionary" [message #6783 is a reply to message #6782] Wed, 15 July 2015 08:38 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3199
Registered: February 2013
Senior Member
The .DO file contains instructions for reading the data and the .DCT file contains specifications for the layout of the data. The .DO file refers directly to the .DCT file, which in turn refers to the data (.DAT) file. You will need to modify both the .DO file and the .DCT file to change the filenames at the beginning of each file to specify the correct drive and the full path name of the directory in which the data file resides. These modifications can be done using a text editor such as Wordpad or Edit. Once these have been modified, you simply run the .DO file in Stata by starting Stata and then clicking on File, Do from the menu and selecting the .DO file. This will read the data into Stata. After the data have been read into Stata do not forget to save the file as a Stata dataset (.DTA extension).
Re: Error after using SELECT - "File does not contain dictionary" [message #6785 is a reply to message #6783] Wed, 15 July 2015 11:23 Go to previous messageGo to next message
jack26h
Messages: 2
Registered: July 2015
Member
Thank you! Very helpful instructions.
Re: Error after using SELECT - "File does not contain dictionary" [message #6787 is a reply to message #6785] Wed, 15 July 2015 11:45 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3199
Registered: February 2013
Senior Member
You are welcome.
Previous Topic: Creating Groups within datasets
Next Topic: Merging households members files+male files+female files
Goto Forum:
  


Current Time: Sun Nov 24 19:33:53 Coordinated Universal Time 2024