[R] Baffled by drop1
George W. Gilchrist
gwgilc at wm.edu
Thu Mar 3 15:46:17 CET 2005
I've been experimenting with drop1 for my biostatistics class, to obtain the
so-called Type III sums of squares. I am fully aware of the deficiencies of
this method, however I feel that the students should be familiar with it.
What I find baffling is that when applied to a fully balanced design, you
obtain different sums of squares. I've used this for several years in Splus
and R and never encountered this before. Am I off my rocker? I have read the
help files and remain clueless. Thanks for any advice.
> replications(Wt~Sex*Par.trt, data=tmp1)
$Sex
[1] 22
$Par.trt
[1] 22
$"Sex:Par.trt"
Par.trt
Sex N S
F 11 11
M 11 11
> summary(tmp2<-aov(Wt~Sex*Par.trt, data=tmp1))
Df Sum Sq Mean Sq F value Pr(>F)
Sex 1 215600 215600 31.5367 1.638e-06 ***
Par.trt 1 7127 7127 1.0425 0.3134
Sex:Par.trt 1 19236 19236 2.8138 0.1013
Residuals 40 273459 6836
---
Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
> drop1(tmp2, ~., test="F")
Single term deletions
Model:
Wt ~ Sex * Par.trt
Df Sum of Sq RSS AIC F value Pr(F)
<none> 273459 392
Sex 1 53018 326477 398 7.7552 0.008144 **
Par.trt 1 1473 274932 391 0.2154 0.645067
Sex:Par.trt 1 19236 292695 393 2.8138 0.101256
---
Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
>
==================================================================
George W. Gilchrist Email #1: gwgilc at wm.edu
Department of Biology, Box 8795 Email #2: kitesci at cox.net
College of William & Mary Phone: (757) 221-7751
Williamsburg, VA 23187-8795 Fax: (757) 221-6483
http://gwgilc.people.wm.edu/
More information about the R-help
mailing list