[R] correlation

Jim Lemon jim at bitwrit.com.au
Fri Oct 17 11:05:41 CEST 2008

kdebusk wrote:
> What test do I use to determine if there is a correlation between a
> discrete variable and a continuous variable?
> For example - I have water quality ratings for streams (excellent,
> good, fair, poor) and a corresponding nitrogen concentration for each
> rating. I want to know if the the ratings correlate with the
> concentration of nitrogen in the stream.

Here you have an ordinal and a continuous variable. The appropriate correlation method is polyserial (see polycor package) if you can assume that your categories arise from a normal distribution.


More information about the R-help mailing list