# Which model is a better fit?

Suppose I have 2 linear model such that:

Linear model 1:

Call:
lm(formula = profit ~ bar)

Residuals:
Min      1Q  Median      3Q     Max
-67.828 -15.376   0.602  15.099  42.803

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -36.2356   178.9080  -0.203    0.840
bar           0.1505     0.1763   0.854    0.394

Residual standard error: 21.73 on 181 degrees of freedom
Multiple R-squared:  0.004011,  Adjusted R-squared:  -0.001492
F-statistic: 0.7289 on 1 and 181 DF,  p-value: 0.3944


Linear model 2:

Call:
lm(formula = profit ~ rain)

Residuals:
Min      1Q  Median      3Q     Max
-68.619 -15.349   0.861  16.000  41.926

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 118.2585     1.6851  70.177  < 2e-16 ***
rain         -1.5741     0.5422  -2.903  0.00415 **
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 21.28 on 181 degrees of freedom
Multiple R-squared:  0.04449,   Adjusted R-squared:  0.03921
F-statistic: 8.428 on 1 and 181 DF,  p-value: 0.004154


These are 2 univariate linear models.

How do I determine which linear model is a better fit? Is it the Higher adjusted R squared?

So linear model 2 is a better fit?

• The $R^2$ is probably not a good indicator for the goodness-of-fit of a model. In your case you can use the root mean squared error or maybe an information criterion like the Akaike Information Criterion. – horseoftheyear May 29 at 18:15