Announcement

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

  • How to convert sas file into dta file on stata?

    Hi all,

    I am fairly new to Stata and I would like some help with finding out how to convert sas file into dta file?

    Here are the files I am trying to convert: http://vanneman.umd.edu/districts/files/index.html

    Thank you.

    EDIT: Actually, any way/ideas of using the file on Stata would be welcomed.
    Last edited by John Vonn; 27 Mar 2016, 12:07.

  • #2
    SAS can save-as Stata. I forget the commands and don't have SAS handy today, but you should be able to find it easily enough, I think file-export.

    Comment


    • #3
      Do you have access to SAS? Upon looking at the link you provided, it has some really ugly SAS syntax for reading in raw text. If you have access to SAS, pretty trivial to save-as (or export-as, I forget). But without access to SAS to run their code and get to that point, it would be nasty.

      I can probably run their SAS code tomorrow and export as Stata if you don't have access to SAS.

      Comment


      • #4
        Originally posted by ben earnhart View Post
        Do you have access to SAS? Upon looking at the link you provided, it has some really ugly SAS syntax for reading in raw text. If you have access to SAS, pretty trivial to save-as (or export-as, I forget). But without access to SAS to run their code and get to that point, it would be nasty.

        I can probably run their SAS code tomorrow and export as Stata if you don't have access to SAS.

        That would be incredibly helpful and I'd like to take your offer up.

        Unfortunately, I don't have access to SAS and I have never used it before.

        Comment


        • #5
          See http://www.stata.com/statalist/archi.../msg00535.html .
          David Radwin
          Senior Researcher, California Competes
          californiacompetes.org
          Pronouns: He/Him

          Comment


          • #6
            Doesn't work for me unfortunately.

            Does anyone have SAS software? If so, could someone please try to open the SAS file and convert it (or export as dta) into dta file using SAS software and then upload the dta file on here for me?

            Here are the files: http://vanneman.umd.edu/districts/files/index.html


            Comment


            • #7
              Unfortunately, the files are in raw text, an a strange multi-line format that would be a real pain to read in with anything but the pre-pepared syntax. If they were .sas7bdat files, then they'd be no problem. I've had my SAS tied up all morning with work-work, but should be able to run the code soon then convert to Stata.

              Comment


              • #8
                Somebody who uses these files might suggest to the maintainer that it would be nice if the SAS-format files were also available. Then somebody without SAS could run Stat/Transfer or some other program that will convert the files from SAS to Stata or other formats.
                -------------------------------------------
                Richard Williams, Notre Dame Dept of Sociology
                StataNow Version: 19.5 MP (2 processor)

                EMAIL: [email protected]
                WWW: https://www3.nd.edu/~rwilliam

                Comment


                • #9
                  Here's one of the files. The others are apparently too large to do as attachments on Statalist, and it doesn't like zipfiles. I'll probably put them on Google Docs for you, watch for links in a bit.
                  Attached Files

                  Comment


                  • #10
                    Originally posted by ben earnhart View Post
                    Here's one of the files. The others are apparently too large to do as attachments on Statalist, and it doesn't like zipfiles. I'll probably put them on Google Docs for you, watch for links in a bit.


                    Thank you! And do please try to upload other files.

                    I really do appreciate your help.

                    Comment


                    • #11
                      https://drive.google.com/file/d/0B1O...ew?usp=sharing

                      https://drive.google.com/file/d/0B1O...ew?usp=sharing

                      https://drive.google.com/file/d/0B1O...ew?usp=sharing

                      Should be good to go, or alt least have them in Stata format. I hope the codebook is better than the data format...

                      Comment


                      • #12
                        Originally posted by ben earnhart View Post
                        https://drive.google.com/file/d/0B1O...ew?usp=sharing

                        https://drive.google.com/file/d/0B1O...ew?usp=sharing

                        https://drive.google.com/file/d/0B1O...ew?usp=sharing

                        Should be good to go, or alt least have them in Stata format. I hope the codebook is better than the data format...


                        Hi,

                        Thank you so much. I appreciate it.

                        I've spotted one little problem with the panel data which I will post a new topic about.

                        Regards,
                        Edward

                        Comment

                        Working...
                        X