# linear.hypothesis

0th

Percentile

##### Test Linear Hypothesis

Test a linear hypothesis for a linear or generalized linear model.

Keywords
models, regression, htest
##### Usage
linear.hypothesis(model, ...)

lht(...)

## S3 method for class 'lm':
linear.hypothesis(model, hypothesis.matrix, rhs=0,
summary.model=summary(model, corr = FALSE),

## S3 method for class 'glm':
linear.hypothesis(model, hypothesis.matrix, rhs=0,
summary.model=summary(model, corr = FALSE), ...)

## S3 method for class 'chisq.test':
print(x, ...)

## S3 method for class 'F.test':
print(x, ...)
##### Arguments
model
model object produced by lm or glm.
hypothesis.matrix
matrix (or vector) giving linear combinations of coefficients by rows.
rhs
right-hand-side vector for hypothesis, with as many entries as rows in hypothesis.matrix.
summary.model
a summary object for the model; usually specified only when linear.hypothesis is called from another function that has already computed the summary.
if TRUE use heteroscedasticity-corrected covariance matrix.
error.SS
error sum of squares for the hypothesis; if not specified, will be taken from model.
error.df
error degrees of freedom for the hypothesis; if not specified, will be taken from model.
x
chisq.test or F.test object.
...
aruments to pass down.
##### Details

Computes an F-test for the hypothesis in a linear model, or a Wald test in a generalized linear model.

##### Value

• Returns an F.test or chisq.test object, with components:
• SSHsum of squares for hypothesis (for a linear model).
• SSEerror sum of squares (for a linear model).
• fF-statistic for the hypothesis (for a linear model.)
• Dfdegrees of freedom for F or chisquare.
• pp-value for the hypothesis.
• ChiSquarechisquare statistic for the hypothesis (for a generalized linear model).

##### References

Fox, J. (1997) Applied Regression, Linear Models, and Related Methods. Sage.

anova, Anova, hccm

##### Aliases
• linear.hypothesis
• lht
• linear.hypothesis.lm
• linear.hypothesis.glm
• print.F.test
• print.chisq.test
##### Examples
data(Davis)
mod<-lm(weight~repwt, data=Davis)
linear.hypothesis(mod, diag(2), c(0,1))
## F-Test
## SS = 245.9738     SSE = 12828.03     F = 1.735312  Df = 2 and 181     p = 0.179266
Documentation reproduced from package car, version 1.0-14, License: GPL version 2 or newer

### Community examples

Looks like there are no examples yet.