Solved – What F-test is performed by $\texttt{lm()}$ function in R, at the end of the output

anovaf-testmodel selectionrregression

I was wondering what is the F test (in general) that is done by the function $\texttt{lm()}$ in R.

I mean you can do different F tests, which one does it chose and how? For instance in a linear regression setting, I can fit a certain model with $\texttt{lm()}$ , but (before running the code) how do we know against which model it will be compared to?

For instance look at this:
enter image description here

For instance my model here is of the form $$Y_i= \beta_0+\beta_1x_{i1}+\beta_2x_{i2}+\beta_3x_{i1}^2+\beta_4x_{i2}^2+\beta_5x_{i1}x_{i2}+\epsilon_i$$ but, before running this code, what F-test could I have expected to get out of $\texttt{lm()}$? And what test (here) has actually been performed?

Best Answer

The $F$ test always tests against the intercept-only model (y ~ 1) unless the model has not intercept, then a zero-mean model is used (y ~ 0). In your case, this means that the null hypothesis $\beta_1 = \dots = \beta_5 = 0$ is tested.

Related Question