[R] drop1

Bill.Venables@cmis.csiro.au Bill.Venables at cmis.csiro.au
Thu Oct 3 02:20:44 CEST 2002


The explanation is simple.  The default R contrasts are

options(contrasts=c("contr.treatments", "contr.poly"))

whereas for S-PLUS (on which I worked) they are

options(contrasts=c("contr.helmert", "contr.poly"))

If you declare these as the contrasts (or indeed any of the standard
contrast matrix generators EXCEPT contr.treatment) you should get the same
answers as published in the Exegeses paper.

Someday I really need to update and publish that old thing... Hmm.

Bill Venables.

-----Original Message-----
From: Federico Calboli [mailto:f.calboli at ucl.ac.uk]
Sent: Thursday, October 03, 2002 2:25 AM
To: r-help at stat.math.ethz.ch
Subject: [R] drop1


Dear All,

I was trying to reproduce prof. Venables analysis on Sheffe data for rats:

http://www.stats.ox.ac.uk/pub/MASS3/Exegeses.pdf

I have no problems concerning the aov side of the analysis, but I noticed
that drop1 in R gives me a completely different result than those on the
Exegeses. In particular my Sum of Squares and RSS are wildly different.

I used :

> drop1(aov.model1,.~.,test="F")

Single term deletions

Model:
WT ~ Litter + Mother + Litter:Mother
              Df Sum of Sq    RSS    AIC F value   Pr(F)  
<none>                     2440.8  257.0                  
Litter         3     591.7 3032.5  264.3  3.6362 0.01968 *
Mother         3     582.3 3023.1  264.1  3.5782 0.02099 *
Litter:Mother  9     824.1 3264.9  256.8  1.6881 0.12005  

which is pretty different form prof. Venables results:

Model:
Wt ~ Litter * Mother
	Df 	Sum of Sq RSS 	F Value 	Pr(F)
<none> 	2440.816
Litter	 3 	27.6559 2468.472 0.169959 0.9161176
Mother 	3 	671.7376 3112.554 4.128153 0.0114165
Litter:Mother 9 824.0725 3264.889 1.688108 0.1200530

Any suggestion why?

Regards,
Federico Calboli

=========================

Federico C.F. Calboli

Department of Biology
University College London
Room 327
Darwin Building
Gower Street
London
WClE 6BT

Tel: (+44) 020 7679 4395 
Fax (+44) 020 7679 7096
f.calboli at ucl.ac.uk

=========================



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-
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 at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list