Search code examples
statisticsspss

How can I determine a correlation from 2 metric variables?


I would like to know how to find a correlation of 2 metric variables in SPSS.

I have to find a correlation between the "Number of borrowed cars (metric)" and the "Temperature(Metric)" at a certain "Daytime (Nominal)" = 8pm. Unfortunately, I do not have the experience in statistics to know with which analysis I can work this case. Does anyone have a solution for me?


Solution

  • The following will give you the correlation for every separate value of Daytime:

    sort cases by Daytime.
    split file by Daytime.
    correlations Ncars with Temperature.
    split file off.
    

    If you only want the value for 8pm, you can use filter:

    compute filt = (Daytime = 8).
    filter by filt.
    correlations Ncars with Temperature.
    filter off.
    

    If you don't want the filter to be temporary, you can use select if Daytime = 8. .