What is a Spearman Correlation Analysis?
Correlation describes the strength and direction of the relationship between two variables. Spearman’s correlation coefficient is a non-parametric statistic technique. It can only take values from -1 to +1. The sign indicates whether the correlation is positive (both variables decrease or increase) or negative (one variable decreases when the other increases and vice versa). A perfect correlation, 1 or -1, indicates that the value of one variable can be accurately determined when we know the value of the other. A correlation equal to 0 indicates no relationship between the two variables.
And its interpretation is similar to that of Pearsons, e.g. the closer
is to the stronger the monotonic relationship. Correlation is an effect size and so we can verbally describe the strength of the correlation using the following guide for the absolute value of
.00-.19 “very weak”
.80-1.0 “very strong”
When Should a Spearman’s Rho Correlation be Used?
Spearman’s rank-order correlation is the nonparametric version of the Pearson product-moment correlation. Spearman’s correlation coefficient does not require continuous-level data (interval or ratio), because it uses ranks instead of assumptions about the distributions of the two variables. This allows us to analyze the association between variables of ordinal measurement levels. Moreover, the Spearman correlation does not assume that the variables are normally distributed. A Spearman correlation analysis can therefore be used in many cases in which the assumptions of the Pearson correlation (continuous-level variables, linearity, heteroscedasticity, and normality) are not met.
An Example Of Spearman’s Correlation Test
For example, a researcher wants to examine the relationship between the level of happiness and the number of hours slept. Then we have two variables: the level of happiness and the number of hours slept.
What are the use of null and alternative hypothesis for the correlation analysis?
Therefore, we test the following hypotheses:
Null hypothesis: There is no significant relationship between the level of happiness and the number of hours slept.
Alternative hypothesis: There is a significant relationship between the level of happiness and the number of hours slept.
R function to Compute Spearman Correlation
The code to run a Spearman Rank Correlation Analysis using R is as follows:
cor.test (x, y, method=(“pearson”, “kendall”, “spearman”), data = dataframe)
x, y: numeric vectors with the same length
method: correlation method