y <- c(43, 62, 49, 60, 36, 79, 55, 42, 67, 50)
x1 <- c(3, 6, 4, 6, 2, 7, 4, 2, 7, 5)
x2 <- c(4, 6, 3, 7, 1, 9, 3, 3, 8, 4)
out <- lm(y ~ x1 + x2)
b <- coef(out)
V <- vcov(out)
n <- length(y)
q <- c(0, .5, .5)
b
ci.lc.glm(.05, n, b, V, q)
# Should return:
# (Intercept) x1 x2
# 26.891111 3.648889 2.213333
#
# Estimate SE t df p LL UL
# 2.931111 0.4462518 6.56829 7 0.000313428 1.875893 3.986329
Run the code above in your browser using DataLab