test_coef_equality {regrrr}R Documentation

testing equality of two coefficients (difference between coefficients of regressors), a Wald test note: if v is not alternatively specified, use car::linearHypothesis(lm_model, "X1 = X2")

Description

testing equality of two coefficients (difference between coefficients of regressors), a Wald test note: if v is not alternatively specified, use car::linearHypothesis(lm_model, "X1 = X2")

Usage

test_coef_equality(model, var1.name, var2.name, v = NULL)

Arguments

model

the model object, such as a "lm" object

var1.name

X1 name in model, a string

var2.name

X2 name in model, a string

v

a customized variance-covariance matrix

data(mtcars) m1 <- lm(mpg ~ vs + carb + hp + wt + wt * hp , data = mtcars) summary(m1) test_coef_equality(model = m1, var1.name = "carb", var2.name = "hp")


[Package regrrr version 0.1.3 Index]