| wald.test {aod} | R Documentation |
Computes a Wald chi-squared test for 1 or more coefficients, given their variance-covariance matrix.
wald.test(Sigma, b, Terms = NULL, L = NULL, H0 = NULL,
df = NULL, verbose = FALSE)
## S3 method for class 'wald.test':
print(x, digits = 2, ...)
Sigma |
A variance-covariance matrix, usually extracted from one of the fitting functions available in R
(e.g., lm, glm, ...).
|
b |
A vector of coefficients with variance-covariance matrix Sigma. These coefficients
are usually extracted from one of the fitting functions available in R (e.g., lm, glm,...).
|
Terms |
An optional integer vector specifying which coefficients should be jointly tested, using a Wald
chi-squared or F test. Its elements correspond to the columns or rows of the
variance-covariance matrix given in vc. Default is NULL.
|
L |
An optional matrix conformable to b, such as its product with b i.e., L %*% b
gives the linear combinations of the coefficients to be tested. Default is NULL.
|
H0 |
A numeric vector giving the null hypothesis for the test. It must be as long as terms or
must have the same number of columns as L. Default to 0 for all the coefficients to be tested.
|
df |
An optional numeric scalar giving the number of degrees of freedom to be used in an F test, i.e. the number of
degrees of freedom of the residuals of the model from which b and Sigma were fitted. Default to
NULL, for no F test. See the section Details for more information.
|
verbose |
A logical scalar controlling the amount of output information. The default value is FALSE, providing
minimum output; verbose = TRUE will result in displaying more details.
|
x |
Object of class “wald.test” |
digits |
Number of decimal places for displaying test results. Default to 2. |
... |
Additional arguments to print.
|
The key assumption is that the coefficients asymptotically follow a (multivariate) normal distribution with mean =
model coefficients and variance = their variance - covariance matrix.
One (and only one) of Terms or L must be given. When L is given, it must have the same number of
columns as the length of b, and the same number of rows as the number of linear combinations of coefficients.
When df is given, the chi-squared Wald statistic is divided by m = the number of
linear combinations of coefficients to be tested (i.e., length(Terms) or nrow(L)). Under the null
hypothesis H0, this new statistic follows an F(m, df) distribution.
An object of class wald.test, printed with print.wald.test.
Diggle, P.J., Liang, K.-Y., Zeger, S.L., 1994. Analysis of longitudinal data. Oxford, Clarendon Press, 253 p.
Draper, N.R., Smith, H., 1998. Applied Regression Analysis. New York, John Wiley & Sons, Inc., 706 p.
data(orob2) fm <- quasibin(cbind(y, n - y) ~ seed * root, data = orob2) # Wald test for root effect wald.test(b = coef(fm), Sigma = vcov(fm), Terms = 3:4)