Spearman's Correlation with Nominal Variables

Discuss statistics related things
Post Reply
goddessoflists
Posts: 4
Joined: Thu Mar 31, 2022 5:36 pm

Spearman's Correlation with Nominal Variables

Post by goddessoflists »

I wanted to see the correlation between the number of statements marked as true on a survey of myths [Total T] and the respondents' sex, year in college, socio-economic background, and rural/semi-urban/urban/metropolitan background.

All were ordinal variables and performed some descriptive statistics with no issues.

However, while trying to see the correlation between Total T and the other variables, jamovi didn't accept the variables, even though they were, like Total T, ordinal. I changed the entries to numbers (Female = 1, Male = 2, and so on) for each variable but jamovi still didn't accept them.

I exported the file as a .csv file, then imported it back into jamovi. This time, I was able to easily see the correlations and jamovi computed the correlation.

The output didn't disappear even when I changed the variables (except Total T) to nominal.

These variables had levels in a particular order (Metropolitan was Level 1, Urban was Level 2, Lower Class was Level 1, Middle Class was Level 2 and so on) and when I changed these to numbers I followed these levels (so Metropolitan became 10, Urban 20, Lower Class 11, Middle Class 22, and so on) before I did the exporting-importing and jamovi accepted the variables.

My question is, does that make my results invalid somehow since I changed the entries of each variable so many times? Or are my results unaffected?

Secondly, why didn't jamovi accept the variables when they were ordinal even though it showed that it accepted both continuous and ordinal variables for correlation (their icons in the bottom right corner blinked every time I tried to enter a variable like sex or year of study for correlation)?
User avatar
jonathon
Posts: 2622
Joined: Fri Jan 27, 2017 10:04 am

Re: Spearman's Correlation with Nominal Variables

Post by jonathon »

attach a .omv file of the issue, and we'll take a look.

jonathon
goddessoflists
Posts: 4
Joined: Thu Mar 31, 2022 5:36 pm

Re: Spearman's Correlation with Nominal Variables

Post by goddessoflists »

Here:
Attachments
Prevalence ANOVA Correlation 1 - jamovi issue.omv
(138.24 KiB) Downloaded 142 times
User avatar
jonathon
Posts: 2622
Joined: Fri Jan 27, 2017 10:04 am

Re: Spearman's Correlation with Nominal Variables

Post by jonathon »

yes, it looks as though the correlation does not accept text values.

until we address this, you'll need to recode the text values into numeric values.

https://blog.jamovi.org/2018/10/23/tran ... ables.html
Screen Shot 2022-04-03 at 16.05.10.png
Screen Shot 2022-04-03 at 16.05.10.png (815.41 KiB) Viewed 2380 times
goddessoflists
Posts: 4
Joined: Thu Mar 31, 2022 5:36 pm

Re: Spearman's Correlation with Nominal Variables

Post by goddessoflists »

Great, thanks!
goddessoflists
Posts: 4
Joined: Thu Mar 31, 2022 5:36 pm

Re: Spearman's Correlation with Nominal Variables

Post by goddessoflists »

It accepted the transformed variables and the results turned out the same. I guess I can say now that the meaning of the results stays the same, given that I transformed the text into numbers; I'm not familiar with the technical side of things and statistics isn't my strongest suit so I was worried that somehow the actual correlation (and therefore what the results mean for the topic I'm studying) would change because of the changes I made.

I'm still not clear on that count.
Post Reply