Hi,
	Is this a bug or do I just not understand model.tables?

The problem is this: in the following, shouldn't the difference in
means computed by model.tables be equal to the difference in the
corresponding coefficients from coef(fit)?  That is, comparing diets
d and e shouldn't

34.71 - 41.53 = -6.82			# diff from model.tables

be equal to

-5.22500000  - 3.30000000 = -8.525	# diff from coef(fit)



Or am I just completely misinterpreting something basic?

Simon.


R : Copyright 1999, The R Development Core Team
Version 0.65.1 Release (October 07, 1999)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type    "?license" or "?licence" for distribution details.

R is a collaborative project with many contributors.
Type    "?contributors" for a list.

Type    "demo()" for some demos, "help()" for on-line help, or
        "help.start()" for a HTML browser interface to help.
Type    "q()" to quit R.

> rabbit <- read.table("rabbit.data",header=T)
> rabbit
   litter diet gain
1      L1    f 42.2
2      L1    b 32.6
3      L1    c 35.2
4      L2    c 40.9
5      L2    a 40.1
6      L2    b 38.1
7      L3    c 34.6
8      L3    f 34.3
9      L3    d 37.5
10     L4    a 44.9
11     L4    e 40.8
12     L4    c 43.9
13     L5    e 32.0
14     L5    c 40.9
15     L5    d 37.3
16     L6    b 37.3
17     L6    f 42.8
18     L6    e 40.5
19     L7    d 37.9
20     L7    a 45.2
21     L7    b 40.6
22     L8    a 44.0
23     L8    e 38.5
24     L8    f 51.9
25     L9    d 27.5
26     L9    b 30.6
27     L9    e 20.6
28    L10    f 41.7
29    L10    d 42.3
30    L10    a 37.3
> fit <- aov(gain ~ litter+diet,data=rabbit)
> model.tables(fit,"means")
Tables of means
Grand mean
         
38.46667 

 litter 
   L1   L10    L2    L3    L4    L5    L6    L7    L8    L9 
36.67 40.43 39.70 35.47 43.20 36.73 40.20 41.23 44.80 26.23 

 diet 
    a     b     c     d     e     f 
38.89 37.50 39.21 38.95 34.71 41.53 
> coef(fit)
(Intercept)   litterL10    litterL2    litterL3    litterL4    litterL5 
36.01388889  3.29722222  4.13333333 -1.80277778  8.79444444  2.30555556 
   litterL6    litterL7    litterL8    litterL9       dietb       dietc 
 5.40833333  5.77777778  9.42777778 -7.48055556 -1.74166667  0.40000000 
      dietd       diete       dietf 
 0.06666667 -5.22500000  3.30000000 





-- 
*****************************************************************
*  Simon Wotherspoon                               _--_|\       *
*  Maths Dept, University of Tasmania             /  Aus \      *
*  Tasmania, Australia                            \_.--._/      *
*  spoon@hilbert.maths.utas.edu.au                      v       *
*****************************************************************

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

