3

I have a question regarding $R^2$.

Say, a model A predicts $y$ based on $x$, and a model B predicts $x$ based on y. I want to test which model is a better fit to the data.

Since model A predicts $y$, the $R^2$ for that model will compare $\hat{y}$ (y_predicted) to $y$ (y_measured), and the $R^2$ for model B will compare $\hat{x}$ (x_predicted) to $x$ (x_measured).

Is it possible to compare these two values of $R^2$ directly?

Jeremy Miles
  • 17,812
Erik
  • 31

1 Answers1

2

Without more information on your data and your situation (what are you trying to do in the first place?), this is likely not answerable.

For instance, suppose that $x$ comes from any distribution, and $y=1$ if $x>0$, otherwise $y=0$. It is easy to build a perfect model for $y$ based on $x$, so this $R^2$ should be essentially $1$. But predicting $x$ from $y$ is extremely hard, and we can make the achievable $R^2$ for this step as low as we want by simply choosing "worse and worse" distributions for $x$.

Stephan Kolassa
  • 123,354
  • The data is predictable both ways. The variable y is not independent of x and vice-versa. There is no causational relation between them but they are related (if you know x, you can predict y with one model and if you know y, you can predict x with another model). I have a set of data with both x and y (real life measurements) and trying to compare two real-life models. it just so happens that not both models predict y from x. – Erik Jan 23 '24 at 12:41
  • I would still say that my answer applies: in the generality in which you pose the question, it is likely not answerable. Perhaps you can give some more information about your specific situation? – Stephan Kolassa Jan 23 '24 at 12:46