Checking Correlation of Categorical variables in SPSS

I am building a predictive model for a classification problem using SPSS. Of the Independent variables, I have both Continuous and Categorical variables. SPSS gives only correlation between continuous variables.

Is there a way in SPSS to find the correlation

a)between two categorical variables
b)between categorical and continuous variables?

Topic spss correlation categorical-data

Category Data Science


Another approach is to use the SPSSINC HETCOR extension command. It calculates set of Pearson, polychoric, or polyserial correlations according the measurement levels of the variables. This extension requires both the Python and R Essentials.


For testing the correlation between categorical variables, you can use:

  1. binomial test: A one sample binomial test allows us to test whether the proportion of successes on a two-level categorical dependent variable significantly differs from a hypothesized value. For example, using the hsb2 data file, say we wish to test whether the proportion of females (female) differs significantly from 50%, i.e., from .5. We can do this as shown below.

  2. chi-square test: A chi-square goodness of fit test allows us to test whether the observed proportions for a categorical variable differ from hypothesized proportions. For example, let's suppose that we believe that the general population consists of 10% Hispanic, 10% Asian, 10% African American and 70% White folks. We want to test whether the observed proportions from our sample differ significantly from these hypothesized proportions.

You can find the code for doing above analysis from the link below:

Source: http://www.ats.ucla.edu/stat/spss/whatstat/whatstat.htm

I'm not sure about comparing numerical and categorical variables but one thing you can do is to transform the numerical variable into categories. For example, if it is age, then, you can transform it to: [0,10), [10,20), ... , [90,100), so that you can compare the correlation of age with other categorical variables.

Hope it helps.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.