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: coefficients, which is a vector of coefficient estimates, and vcov, which is the variance-covariance matrix of the coefficient estimates.

R

A matrix of linear restrictions. Each row of R represents a different linear restriction. R should have the same number of columns as length(regresults$coefficients).

r

A vector of constants, equal to the number of rows in R. This is what we are testing that each linear restriction is equal to.

Value

A list with the following items:

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]