Hello, I have a small statistics question, and as I'm quite new to statistics and R, I'm not sure if I'm doing things correctly.
I am looking at two quantitative variables (x,y) that are correlated. When I divide the data set according to a categorical variable z, then x and y are more poorly correlated when z = A than when z = B (see attached figure). In fact x and y are two (correlated) predictor variables and z is a categorical response variable that x and y affect. I would like to use R to make some statistical test to show that you seem to get z = A when the value of x is much less than y, while you tend to get z = B when x is approximately the same as y. Can anybody tell me what I should be doing? I tried a logistic regression: > glm1 <- glm(z ~ y + x,family=binomial(),trace=T) which gives Pr(>|z|) < 0.01 for both x and y, but I'm not sure if this is valid to do, since x and y are correlated? As well this test does not show that it is for values of x << y that we tend to get z = A, and that for values of x approx = y, that we tend to get z = B. I'm not sure how to show this? I'll be very grateful if anyone can help. Avril
avril.ps
Description: PostScript document
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
