I have a simple linear regression model, $\textrm{Weight} = \beta_0 + \beta_1 \cdot \textrm{Height}$. Can I pick only men, fit model 1, get an $R_{\rm men}^2$, and do the same for women with $R_{\rm women}^2$, and compare these two?

Or only the explanatory variables' change can be compared, i.e., use only men, and add $\beta_2 \cdot \textrm{Age}$ and compare $R_{{\rm men},h}^2$ and $R_{\rm{men},h,a}^2$?

I tried to simplify my problem, but here is the real problem. I have house prices, and their initial list price.

The odel is:

$$ \textrm{Price}=\beta_0 + \beta_1 \textrm{List} + \epsilon \quad . $$

I then fit this model using the data from New York, and Los Angeles. Specifically three models:

  • Only New York houses
  • Only Los Angeles houses
  • Both NY+LA

Is it reasonable to compare the $R^2$ fitted to these three models?

  • 5
    $\begingroup$ What is the goal of your analysis? $\endgroup$
    – Dave
    Oct 9, 2019 at 21:16
  • 5
    $\begingroup$ You can compare the correlations but I think Dave's question is a crucial question to address before jumping in. $\endgroup$
    – Glen_b
    Oct 9, 2019 at 21:32
  • 1
    $\begingroup$ Establishing a model to estimating the weight later. In my case, I'm actually estimating sales price of a home from the listing price, so I guess not to explain relationships, but to do predictive modeling. $\endgroup$ Oct 9, 2019 at 23:51
  • 1
    $\begingroup$ In that case use a predictive measure instead to compare models. $\endgroup$ Oct 10, 2019 at 8:27
  • 1
    $\begingroup$ You can also fit a single model with Height, Sex, and a Height x Sex interaction term. $\endgroup$
    – mkt
    Oct 10, 2019 at 10:54

1 Answer 1


I'm still not 100% sure what your goal is, but I'm going to take a crack at it.

"Can you compare the $R^2$?" Sure: if you get an $R^2$ of 0.8 for New York and an $R^2$ of 0.6 for LA, you can conclude that initial list price is a better predictor of sale price in NY than in LA. This is not an inferential test (i.e., you don't get a p-value or a measure of clarity), but it might be something you're interested in knowing.

If you fit the model with the interaction:

$$ \textrm{Price} = \beta_0 + \beta_1 \textrm{List} + \beta_2 \textrm{City} + \beta_3 \textrm{City} \cdot \textrm{List} $$ where $\textrm{City}$ is a dummy variable (e.g. =0 for NY, 1 for LA) then you can test whether list price has a significantly greater or lower effect on sale price in different cities (via a null hypothesis test of $\beta_3=0$). If you standardize the prices in each city before analyzing the data (i.e. subtract each city's list prices and sale prices by the mean and divide by the standard deviation for that particular city), then testing $\beta_3$ will essentially give you a test of the differences in predictive accuracy (with the caveat that you'd be assuming that the residual variance is the same in both cities).

  • $\begingroup$ Could we get around your caveat using generalized least squares? $\endgroup$
    – Dave
    Feb 28, 2020 at 13:51
  • $\begingroup$ Yes, I would think so. $\endgroup$
    – Ben Bolker
    Feb 29, 2020 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.