Last Update: March 22, 2022
My online video tutorials are hosted at YouTube channel.
For learning this concept, you can view my online video tutorial: Homogeneity of Regression Slopes: Dummy Variables in R.
Video Code
1. Packages
library(AER)
library(lmtest)
2. Data
data(HousePrices)
3. Model
mlr1 <- lm(formula = price ~ lotsize + bedrooms, data = HousePrices)
4. Homogeneity
Wald Test
mlr2 <- lm(formula = price ~ lotsize + bedrooms + aircon +
lotsize*aircon + bedrooms*aircon, data = HousePrices)
summary(mlr2)
waldtest(object = mlr1, mlr2, test = "F")
Courses
My online courses are hosted at Teachable website.
For more details on this concept, you can view my Linear Regression in R Course.