I am supposed to check the significance of the connection between an arbitary Y variable (nominal\ordinal\binary I cannot know in advance) and an arbitary numeric X variable.
This is a classification problem. However may I just flip the Y and X variables to make the problem simpler and use ANOVA? Instead of Y~X, just X~Y?
in the following post I see the slope of the line changes if we swap Y~X to X~Y. I wonder if it also applies to ANOVA. or effect the goodness of fit: Effect of switching response and explanatory variable in simple linear regression
when I do a little test (am variable is binary):
mydata <- mtcars
summary(lm(am~mpg,data = mydata))
summary(lm(mpg~am,data = mydata))
the F statistic for both regressions is the same.
Thanks!
