F-test tests the null hypothesis that all coefficient of variables in the model equal to zero.
P-value in a hypothesis test shows the probability of having observed results if null hypothesis is true.
My question is that if the model only has one variable, just like m2
and m3
shown as following, is the result of f-statistics just the same as the p-value?
Dataset
Regarding the dataset. The original dataset has 50 states. Alaska
and Texas
are the outliers. From some analysis, I already decide to remove Alaska
as it has a large effect on the linear model according to the regression results. Now the problem is whether Texas
should be removed.
area.no.alaska
has 49 states, Alaska
is removed
area.no.tx.al
has 48 states, Alaska
and Texas
is removed
I am trying to compare m2
with m4
to figure out which is better.
So far, I think m2
is better because it has higher r-square, higher p-value of variable land.area
even though both models have p-value very close to zero for variable land.area
. I am not sure whether it is necessary to compare f-statistics as only one variable in the model and I already compared the p-value of that variable.
m2 = lm(area.no.alaska$farm.area ~ area.no.alaska$land.area)
m4 = lm(farm.area ~ land.area, data = area.no.al.tx)
summary(m4)
Call:
lm(formula = farm.area ~ land.area, data = area.no.al.tx)
Residuals:
Min 1Q Median 3Q Max
-41309 -8736 -1784 4361 36054
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -569.41436 4310.67726 -0.132 0.895
land.area 0.46526 0.06404 7.266 0.00000000365 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 16300 on 46 degrees of freedom
Multiple R-squared: 0.5344, Adjusted R-squared: 0.5242
F-statistic: 52.79 on 1 and 46 DF, p-value: 0.000000003646
```
summary(m2)
Call:
lm(formula = area.no.alaska$farm.area ~ area.no.alaska$land.area)
Residuals:
Min 1Q Median 3Q Max
-50695 -8712 -228 7825 49354
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -8365.76964 4367.14590 -1.916 0.0615 .
area.no.alaska$land.area 0.62171 0.05716 10.877 1.98e-14 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 18620 on 47 degrees of freedom
Multiple R-squared: 0.7157, Adjusted R-squared: 0.7096
F-statistic: 118.3 on 1 and 47 DF, p-value: 1.981e-14
```