Linear hypothesis test on linear regression model coefficients

The *p*-value, *F*-statistic, and numerator degrees of
freedom are valid under these assumptions:

The data comes from a model represented by the formula in the

`Formula`

property of the fitted model.The observations are independent, conditional on the predictor values.

Under these assumptions, let *β* represent the (unknown) coefficient vector
of the linear regression. Suppose *H* is a full-rank matrix of size
*r*-by-*s*, where *r* is the number
of coefficients to include in an *F*-test, and *s* is the
total number of coefficients. Let *c* be a column vector with
*r* rows. The following is a test statistic for the hypothesis that
*Hβ* = *c*:

$$F={\left(H\widehat{\beta}-c\right)}^{\prime}{\left(HV{H}^{\prime}\right)}^{-1}\left(H\widehat{\beta}-c\right).$$

Here $$\widehat{\beta}$$ is the estimate of the coefficient vector *β*, stored in
the `Coefficients`

property, and *V* is the estimated
covariance of the coefficient estimates, stored in the
`CoefficientCovariance`

property. When the hypothesis is true, the test
statistic *F* has an F Distribution with *r* and
*u* degrees of freedom, where *u* is the degrees of
freedom for error, stored in the `DFE`

property.

The values of commonly used test statistics are available in the

`Coefficients`

property of a fitted model.`anova`

provides tests for each model predictor and groups of predictors.

`anova`

| `coefCI`

| `CompactLinearModel`

| `dwtest`

| `LinearModel`

| `linhyptest`