library(hcci)
data(schools)
y = schools$Expenditure # dependent variable
x = schools$Income/10000 # regressor scaled by 10^4
model_1 = lm(y ~ x)
model_2 = lm(y ~ x+I(x^2))
QT(model_1, significance = 0.05, hc=4, h0=0)
QT(model_2, significance = 0.05, hc=4, h0=0)
Run the code above in your browser using DataLab