Announcement

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

  • Errors encountered while importing SPSS files into Stata

    I am trying to import several SPSS files into Stata using the import spss command. With two particular files, I encounter errors which prevent me from importing. The first looks like this:

    Code:
    . import spss using "file1.sav",clear
    note: invalid numeric format %
    note: invalid numeric format %
    note: invalid numeric format %
    note: invalid numeric format %
    note: invalid numeric format %
    note: invalid numeric format %
    error reading file
    r(692);
    This error occurs even when I only try to import variables which I know to be strings from the file using the import spss dialog box.

    When trying to import another SPSS file, I encounter this error:

    Code:
    . import spss using "file2.sav",clear
    error reading file
    r(692);
    Trying to import just the first observation from these files does not work either.

    Strangely enough, the import spss dialog box variable preview displays all of the variables, so clearly Stata can access the file and its contents but can't import it. I don't have access to SPSS, so I can't open the files to see what the problem is.

    Any help is appreciated.
    Last edited by Ali Atia; 13 Nov 2020, 10:35.

  • #2
    I was able to convert the files using Stat/Transfer. Doesn't explain what was wrong with Stata, but it solved my problem.

    Comment


    • #3
      It's hard to comment without access to either file.

      Comment

      Working...
      X