[R] stupid lm() question

Carl Witthoft carl at witthoft.com
Wed Sep 14 00:06:01 CEST 2011


I feel bad even asking, but:

Rgames> data(OrchardSprays)
Rgames> model<-lm(decrease~.,data=OrchardSprays)
Rgames> model

Call:
lm(formula = decrease ~ ., data = OrchardSprays)

Coefficients:
(Intercept)       rowpos       colpos   treatmentB   treatmentC
      22.705       -2.784       -1.234        3.000       20.625
  treatmentD   treatmentE   treatmentF   treatmentG   treatmentH
      30.375       58.500       64.375       63.875       85.625


Rgames> levels(OrchardSprays$treatment)  #just double-checking...
[1] "A" "B" "C" "D" "E" "F" "G" "H"

So: why isn't there a value for the level "A" of treatment? Is it 
because the (alphabetically) first level is treated as the control?
And if so, what should I do (calculate) with the coefficients to compare 
them with the  statistics of the data subset with level "A" ?


Please feel free to tell me to shut up and read some part of R-inferno 
or other helpful document.


Thanks.
Carl


-- 
-----
Sent from my Cray XK6



More information about the R-help mailing list