[R] correlation

hadley wickham h.wickham at gmail.com
Thu Oct 16 17:19:48 CEST 2008

On Thu, Oct 16, 2008 at 8:05 AM, kdebusk <kdebusk at gmail.com> 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.

What does correlation mean in this example?  How can you interpret a
linear correlation when one of your variables is discrete?

Why not start with some exploratory graphics?  For your case, I would
suggest drawing a histogram of nitrogen concentration for each water
quality.  Then look at the histograms - do they look the same? Do they
look different?  If they are different, what features are different?



More information about the R-help mailing list