Dear R Users,
Using lm() function with categorical variable R use contrasts. Let
assume that I have one X independent variable with 3-levels. Because R
estimate only 2 parameters ( e.g. a1, a2)  the coef function returns
only 2 estimators. Is there any function or trick to get another a3
values. I know that using contrast sum (?contr.sum) I could compute a3
= -(a1+a2). But I have many independent categorical variables and I'm
looking for a fast solution.

Robert

______________________________________________
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