wald_test {lineartestr} | R Documentation |
Wald test. Tests restrictions*coefficients = value.
Description
Wald test. Tests restrictions*coefficients = value.
Usage
wald_test(
model,
restrictions,
value,
robust = FALSE,
vcov = NULL,
quantiles = c(0.9, 0.95, 0.99)
)
Arguments
model |
Model compatible with 'fitted' and 'residuals' functions. |
restrictions |
Matrix of size (number of restrictions) times length(coefficients), for free restrictions use zeros. |
value |
Values of restrictions. |
robust |
Use robust 'varcov' matrix. |
vcov |
Particular variance and covariances matrix. |
quantiles |
Vector of quantiles to calculate pvalues. |
Value
A 'tibbble' with the Wald value, the corresponding pvalue and the quantiles of the distribution.
Examples
x <- 1:10
z <- x**2
y <- 1:10
model <- lm(y~x+z)
restrictions <- diag(3)
value <- as.matrix(c(0, 0, 0))
w_test <- wald_test(model, restrictions, value)
w_test <- wald_test(model, restrictions, value, robust = TRUE)
w_test <- wald_test(model, restrictions, value, quantiles = c(.97))
[Package lineartestr version 1.0.0 Index]