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).
- download .dat file
- save in desktop folder (c:\users\owner...)
- download corresponding
.do
,.dct
files here - save them in same folder
- open
.dat
file way open in question in stata - save stata
.dta
file in same folder (c:\users\owner...) - open
.do
file (using notepad++) in (c:\users\owner...) folder - 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 - reopen stata, , run .do file folder (c:\users\owner...)
- 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
Post a Comment