We are discussing lurking variables in class. I have a data set in a spreadsheet in three columns: x, y, and z. The z value is a category with two values. I plot y vs x in a scatter plot where there appears to be a correlation, but what I want to do is change the color of points so that z=1 points are a different color than z=2 points, illustrating that the correlation is destroyed when the lurking variable z is controlled for.
I can't figure out how to do this. I tried splitting up into two lists but it seems I can't combine two scatter plots into one.
Any ideas?
Thanks
Mike