stata - How to open a .dat file (ASCII)? -


i tried open .dat file using stata, , opened, data set complete mess. took file nber (cps data)... click on a icon of year 1964 march.

i tried regular stata procedure .dat files: file->import->askii data created spreadsheet (delimiter " ") recommended in stata manual .dat files.

but still not working. there other ways open .dat file? can convert .csv somehow?

(all data files ascii files compressed unix compress command.)

there java app data cps, dataferrett app lets cps , other data sets. not efficient.

i can show example how open 1 of them (you can use years in interval 1989 till 2012).

  1. download .dat file
  2. save in desktop folder (c:\users\owner...)
  3. download corresponding .do , .dct files here
  4. save them in same folder
  5. open .dat file way open in question in stata
  6. save stata .dta file in same folder (c:\users\owner...)
  7. open .do file (using notepad++) in (c:\users\owner...) folder
  8. at beginning see author presctibes local variables paths of .dta, .dat , .dct files. change paths point saved .dta, .dat , .dct files in folder (c:\users\owner...) on desktop
  9. reopen stata, , run .do file folder (c:\users\owner...)
  10. done! save .dta file

now, years 1962 1988, can same procedure (10 steps) explained above, unfortunately nber not provide .do , .dct files. means have write them yourself. take 1 of available .do , .dct files of years (1989 - 2012) benchmark, , write own .do , .dct files. have make corrections new .do , .dct files consistent corresponding .pdf documentation each year. know tideous, way can handle it.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -