View source: R/test_linear_restrictions.R
test_linear_restrictions | R Documentation |
test_linear_restrictions
takes a set of regression results and
tests multiple linear restrictions simultaneously.
test_linear_restrictions(regresults, R, c = default_test(R))
regresults |
A list containing two items: |
R |
A matrix of linear restrictions. Each row of |
c |
A vector of constants, equal to the number of rows in |
A list with the following items:
W: The Wald (chi-square) statistic
p_value: The p-value of the test
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.