Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How can I create "dct" file to browse data of .dat format?

    Hi everyone,

    I might ask one of the stupidest questions but here is a problem that I've been struggling with for several hours...

    I'd like to import some datasets of .dat file and found this wonderful work from NBER that uploaded the list of do-files and dictionary to import the .dat data files.
    In the dofile, it seems that I have to have "dct" files saved in the directory:

    Code:
    local dat_name "$dir/l04puw1.dat"
    
    ** The following line should contain the path to your output '.dta' file 
    
    local dta_name "$dir/stata/sippl04puw1.dta"
    
    ** The following line should contain the path to the data dictionary file 
    
    local dct_name "$dir/dic/sippl04puw1.dct"
    
    ** The line below does NOT need to be changed 
    
    quietly infile using "`dct_name'", using("`dat_name'") clear
    My question is how to have this dct file downloaded...? If I click one of the dct files in the website above, it leads me to another webpage, for example this, and I don't know how to download it as dct file or how to create dct file using what is written there. Yes, it's my first time using the dictionary file to browse some kind of text-file type data and it's very confusing honestly. I sincerely hope this stupid question doesn't bother you and hope anyone generously answer this question. Thank you so much for reading my question!


  • #2
    Hi Jiwan,

    Thanks for the question! I am encountering the exact same problem as you when I try to download SIPP data from NBER. May I please ask if you have found a solution to this? Thanks for any help you could offer!

    Comment


    • #3
      Seems to me you can right-click the link of the dictionary file you need and Save as to your computer. Give this a try. Make sure that after you download it, the file extension is .dct.

      Comment


      • #4
        Originally posted by Leonardo Guizzetti View Post
        Seems to me you can right-click the link of the dictionary file you need and Save as to your computer. Give this a try. Make sure that after you download it, the file extension is .dct.
        Thank you so much! That worked!

        Comment

        Working...
        X