Global AI and Data Science

Global AI & Data Science

Train, tune and distribute models with generative AI and machine learning capabilities

 View Only
  • 1.  SPSS does not allow me to perform Spearman correlation test on non normally disputed data

    Posted Thu February 08, 2024 10:21 AM

    Hey, 

    I'm trying to perform Spearman correlation test on 110 subjects (cases and controls) to see how two continuous variables correlate with each other. The data is not normally distributed and when trying to correlate the two variables using Spearman correlation I get this error message

    "Too many cases for the available storage.  NONPAR CORR cannot continue." 

    Thanks in advance. 



    ------------------------------
    Adam Adam
    ------------------------------


    #AIandDSSkills


  • 2.  RE: SPSS does not allow me to perform Spearman correlation test on non normally disputed data

    Posted 5 days ago

    I am having the same issue. Did you figure it out?  I would suggest using Pearson's since you have continuous variables.  My issue is I have some non-continuous variables, so I really should be running Spearman, but it just won't work, and I have no clue why.



    ------------------------------
    Elizabeth Isralowitz
    ------------------------------



  • 3.  RE: SPSS does not allow me to perform Spearman correlation test on non normally disputed data

    Posted yesterday

    Spearman's rank correlation or Spearman correlation is usually applied to ordinal (ranked) data. It doesn't need the data to be normal.



    ------------------------------
    Bindu Krishnan
    Senior Statistician
    IBM SPSS Statistics
    ------------------------------



  • 4.  RE: SPSS does not allow me to perform Spearman correlation test on non normally disputed data

    Posted 18 hours ago

    Hi Adam,

    The error message "Too many cases for the available storage. NONPAR CORR cannot continue" in SPSS usually indicates a memory or workspace limitation rather than an issue with the number of cases itself (110 cases is not large for Spearman).

    Here are a few steps you can try:

    1. Increase SPSS workspace memory

      • Go to Edit → Options → General → Working Memory Limit and increase the value (e.g., from default to 512 MB or higher).
    2. Close other datasets and outputs

      • Large open datasets or output windows consume memory. Close unnecessary files before running the test.
    3. Use syntax instead of dialog

      • Run the command directly: NONPAR CORR /VARIABLES=var1 var2 /PRINT=SPEARMAN /MISSING=PAIRWISE.
      • This sometimes bypasses GUI-related memory issues.
    4. Check variable types

      • Ensure both variables are numeric and not string or mixed formats.
    5. If still failing

      • Export the data to a new file and rerun or consider using R or Python for Spearman correlation (e.g., scipy.stats.spearmanr in Python).



    ------------------------------
    Venkata Sathish Reddy Ambati
    ------------------------------



  • 5.  RE: SPSS does not allow me to perform Spearman correlation test on non normally disputed data

    Posted 17 hours ago

    Just an extra comment to the answer about memory , 

    Newer versions of SPSS Statistics do not have this setting under Edit → Options → General, but I believe you can instead enter, for example,
    SET WORKSPACE=500000
    in the Syntax Editor and run the command (i.e., select the text and choose Run Selection).

    This command allocates temporary workspace.

    Another tip: if the data file is very wide and contains many variables, you can save a version of the file that includes only the variables you need and then run your analyses on that file. If you are comfortable with syntax programming, you can use the /KEEP subcommand; otherwise, use Save As – click Variables and check only the variables you need for the correlation. /Gunilla 



    ------------------------------
    Gunilla Rudander
    ------------------------------