View source: R/hypothesis.testing.R
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")
1 | test_coef_equality(model, var1.name, var2.name, v = NULL)
|
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") |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.