# coefTest

Linear hypothesis test on linear regression model coefficients

## Syntax

## Description

## Examples

## Input Arguments

## Output Arguments

## Algorithms

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 numeric index matrix
of size *r*-by-*s*, where *r* is the
number of linear combinations of coefficients being tested, 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)/r.$$

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.

## Alternative Functionality

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.

## Extended Capabilities

## Version History

**Introduced in R2012a**