| wald.test | R Documentation |
The function returns a Wald chi-squared test or a F test for a vector of model coefficients (possibly of length one), given its variance-covariance matrix.
wald.test(b, varb, Terms = NULL, L = NULL, H0 = NULL, df = NULL, verbose = FALSE, ...)
## S3 method for class 'wald.test'
print(x, ..., digits = max(3, getOption("digits") - 3))
b |
A vector of coefficients with their var-cov matrix |
varb |
A var-cov matrix of coefficients |
Terms |
An optional integer vector specifying which coefficients should be jointly tested, using a Wald chi-squared test or a |
L |
An optional matrix conformable to |
H0 |
A numeric vector giving the null hypothesis |
df |
A numeric vector giving the degrees of freedom to be used in an |
verbose |
A logical scalar controlling the amount of output information. The default is |
x |
An object of class “wald.test” |
digits |
A numeric scalar indicating the number of digits to be kept after the decimal place. |
... |
Additional arguments to |
The assumption is that the coefficients follow asymptotically a multivariate normal distribution with mean equal to the model coefficients b and variance equal to their var-cov matrix varb.
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 H_0, 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 <- aodql(cbind(m, n - m) ~ seed * root, data = orob2, family = "qbin")
# Wald chi2 test for the effect of root
wald.test(b = coef(fm), varb = vcov(fm), Terms = 3:4)
L <- matrix(c(0, 0, 1, 0, 0, 0, 0, 1), nrow = 2, byrow = TRUE)
wald.test(b = coef(fm), varb = vcov(fm), L = L)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.