SPSS Statistics

 View Only
  • 1.  SPSS 27: How the correlation can be plotted with colors?

    Posted Sat October 21, 2023 01:15 PM

    SPSS 27: How the correlation can be plotted with colors?

    I couldn't figure out if the SPSS can plot the correlation with colors so that the relationship can be better understood as per the screenshot below

    qq
    rrty


    ------------------------------
    jamal numan
    ------------------------------


  • 2.  RE: SPSS 27: How the correlation can be plotted with colors?

    Posted Sat October 21, 2023 06:04 PM
    You can color the correlations - or any table - using the SPSSINC MODIFY TABLES extension command, but this is a new feature of that command and isn't available on the Extension Hub yet.

    Download the latest version from here
    and install it via Extensions > Install local extension bundles
    It will appear on the Utilities menu.

    You could run it like this (or use the menus)
    CORRELATIONS
      /VARIABLES=bdate educ  salary salbegin jobtime prevexp minority
      /PRINT=TWOTAIL SIG FULL.

    SPSSINC MODIFY TABLES subtype="'Correlations'"
    SELECT="Pearson Correlation"
    DIMENSION=ROWS
    /STYLES  APPLYTO=DATACELLS
    HMAUTOCOLOR=YES USEABS=YES HMSCALE=LINEAR.

    If you want to see only the correlations in the table, double click it and use Pivot > 
    Pivoting Trays to move the other statistics into the layer.
    image.png
    In the dialog box or via syntax there are several controls available on exactly how the coloring interpolation is done.

    If you want to exclude the 1 values from the coloring, you can add a condition to the command like this.
    SPSSINC MODIFY TABLES subtype="'Correlations'"
    SELECT="Pearson Correlation"
    DIMENSION=ROWS
    /STYLES  APPLYTO="x != 1"
    HMAUTOCOLOR=YES USEABS=YES HMSCALE=LINEAR.

    --





  • 3.  RE: SPSS 27: How the correlation can be plotted with colors?

    Posted Tue October 24, 2023 09:30 AM
    Edited by Kirill Orlov Tue October 24, 2023 11:08 AM

    SPSS Macro !KO_EDPROXMX is a command to edit/modify a square proximity matrix such as a correlation matrix or a distance matrix. (The matrix must first be saved as a data set, what you can easily do with CORRELATIONS command.) The macro has an option to plot heatmap of the matrix, in colour or grey shades. So, use it too, if you wish.

    You can download the macro from "Kirill's SPSS macros" page https://www.spsstools.net/en/KO-spssmacros/, collection "Various proximities". But a more convenient way would be to install the KO_macros.spe extension bundle - also found on that page. The bundle contains the aforementioned macro as its part and lets you run the procedure from SPSS menu dialog.



    ------------------------------
    Kirill Orlov
    ------------------------------