Hello R-help,

Is there a way to get R to tell you the coefficients in a lm that it wouldn't normally tell you because of identifiability constraints? For instance, if you use contr.sum() to generate contrasts for a factor, say

## y <- some data
## x <- a factor with levels 1:6
contrasts(x) <- contr.sum(levels(x))
lm.1 <- lm(y ~ x)

how would one persuade summary.lm to give the coefficient for x6 as well as x1 up to x5? I know in this case that x6 is minus the sum of x1 to x5, but I am working on a problem where the constraints are very complicated and it would be a real help to see all the coefficients.

Thanks in advance

James Lawrence.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to