Skip to content
Prev 243747 / 398503 Next

Suitable test for ordinal variable vs continuous variable trend

There are many possibilities depending on what you are really looking for (strict increasing, vs. increasing or constant, vs. general trend, etc.)

I would start with a plot of the data, that may result in a significant interocular concussion test and will at least help you understand what is happening in your data.

The plotting idea can be extended to a more formal test if you have a clear null hypothesis and a way to simulate from the null (e.g. if the null is no relationship, then you can just permute one of the variables) by using the vis.test function in the TeachingDemos package.

You could calculate the correlation between the continuous variable and as.numeric(ordered variable) as a spearman like correlation which would give a general trend.

You could do a linear regression (assuming the continuous variable is close enough to normal conditional on the ordered one) with contrasts set to measure the differences in successive groups, then if all the coefficients are significant and of the same sign, then you have a clear monotonic trend, if you have some that are significant but of different signs then you clearly don't have a monotonic trend, if some are non significant then you need to decide what that means for you.