test_linear_restrictions {probstats4econ} | R Documentation |
Test multiple linear restrictions simultaneously
Description
test_linear_restrictions
takes a set of regression results and
tests multiple linear restrictions simultaneously.
Usage
test_linear_restrictions(regresults, R, r = default_test(R))
Arguments
regresults |
A list containing two items: |
R |
A matrix of linear restrictions. Each row of |
r |
A vector of constants, equal to the number of rows in |
Value
A list with the following items:
W: The Wald (chi-square) statistic
p_value: The p-value of the test
Examples
# test both that the returns to one year of education are
# equal to ten years of age, and that the intercept is zero
model <- estimatr::lm_robust(earnwk ~ age + educ, data = cps)
R <- matrix(c(0, -10, 1, 1, 0, 0), nrow = 2, byrow = TRUE)
test_linear_restrictions(model, R)
[Package probstats4econ version 0.2.0 Index]