Skip to content
Prev 155498 / 398502 Next

puzzle about contrasts

Prof Brian Ripley skrev:
Or accept the default and do the parameter transformations yourself.

l <- lm(y~x)
T <- rbind(
c(-1,-.5),
c(0,1))

c2 <- T%*%coef(l)
V2 <- T%*%vcov(l) %*% t(T)

cbind(coef=c(c2), s.e.=sqrt(diag(V2)))