SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
  • 1.  SPSS bug?

    Posted Thu January 09, 2020 10:49 AM
    We're using version 22 (I think), and it happens a lot that the length of string variables is multiplied by 3 by itself. This happens to all string variables in the same data file. This makes the file size bigger, and impossible to use the "Merge -> add variables" function unless we manually adjust the length back. It's been going on for several years. How to solve this?

    ------------------------------
    Yi Yang
    ------------------------------

    #SPSSStatistics


  • 2.  RE: SPSS bug?

    Posted Fri January 10, 2020 09:04 AM
    What is the source of the data - is it a text file, Excel spreadsheet, or a database table?   The string variables may be padded with blanks, which can be removed with LTRIM or RTRIM function.

    You can determine the version of SPSS Statistics that you're using by going to Help/About on the menu.  The current version is 26, which is available to all IBMers.

    ------------------------------
    Steve Poulin, Ph.D.
    Senior Data Scientist
    IBM Finance Data Science & Technology
    ------------------------------



  • 3.  RE: SPSS bug?

    Posted Mon January 13, 2020 02:26 PM
    My SPSS version is 22.

    The source data was dat or CSV. But I've already imported and saved it as SPSS data (.sav). Then after some time (not sure when) the string width is multiplied by 3 by itself. I wonder if it happens when I merge it with another SPSS file? The previous lower version never had this problem.

    ------------------------------
    Yi Yang
    ------------------------------



  • 4.  RE: SPSS bug?

    Posted Sun April 12, 2020 03:04 PM
    When you convert a sav file from code page model to Unicode, which is implicit if you open it in Unicode mode, it always triples string lengths in order to guarantee that no data are lost.  This is usually much more than necessary,  however, and you can recover the extra space using ALTER TYPE.

    ------------------------------
    Jon Peck
    ------------------------------