I'm tempted to say "Type III Sums of Squares? Just say
'no'." Or any other
type, for that matter.
Personally I would be strongly against this suggestion, as I was when
S-PLUS first proposed it (sadly, to no avail). It would encourage people
to use the damn things! More precisely it would give some unwarranted
credibility to the whole SAS malarkey of "Type X" Sums of Squares,
"Types"
of estimable functions, &c &c and further obscure the essential
simplicity
of linear models.
If people are silly (and cold blooded) enough to use Type III Sums of
Squares the technology is there to do it, provided they understand how to
do it and are prepared to go to a little trouble. I see no reason to make
it easy for them.
This may sound more than a little uncompromising to Kaspar, but this is an
old issue and we have been here lots of times before.
Bill Venables.
At 11:44 AM 5/9/00 +0100, Kaspar Pflugshaupt wrote:>Hello,
>
>I'd like to propose an extension to the function summary.aov.
>
>In Splus (2000, I don't know about other versions), summary.aov allows a
>parameter ssType to be set to 1 or 3 (defaults to 1) to choose the type of
>Sums of Squares.
>
>I know I can get Type III SS in R with drop1(model), but including the
>functionality into summary.aov would, in my opinion,
>
>- yield a more usable table (for example, the residual Df are missing in the
> drop1 table)
>- put it into the obvious place to look for it
>- increase S-Plus compatibility (by a minor degree, I'll admit)
>- not break anything else (I might be wrong here)
>
>Not knowing how to add it to the summary.aov function, I wrote a function to
>extract the SS from drop1 output and paste them into a summary.aov table
>(see below), but that's of course an ugly solution. I feel that there
has to
>be a simpler and more efficient way, such as reusing just the required parts
>of drop1 inside summary.aov. But since I cannot give the matter enough time
>to do it correctly, someone with more insight into the source code would
>have to do it.
>
>If including the functionality via an additional parameter doesn't
require a
>whole rebuild of summary.aov, I'd like to put it as a minor item on the
>wish-list for some next version of R.
>
>Cheers (and thanks for a great piece of software)
>
>Kaspar Pflugshaupt
>
>
>
>"summmary.aov.t3" <-
>function (aov.obj)
>{
> # ugly hack, relies on names in output
> # tables of drop1 and summary.aov
>
> s <- summary(aov.obj)
> d <- drop1(aov.obj, test = "F")
> n <- nrow(d)
> s[[1]]$"Sum Sq"[1:(n - 1)] <- d$Sum[2:n]
> s[[1]]$"Mean Sq" <- s[[1]]$"Sum Sq"/s[[1]]$Df
> s[[1]]$"F value"[1:(n - 1)] <- d$F[2:n]
> s[[1]]$"Pr(>F)"[1:(n - 1)] <- d$Pr[2:n]
> names(s[[1]])[names(s[[1]]) == "Sum Sq"] <- "Sum Sq
(Type III)"
> s
>}
>
>--
>
>Kaspar Pflugshaupt
>Geobotanisches Institut
>Zuerichbergstr. 38
>CH-8044 Zuerich
>
>Tel. ++41 1 632 43 19
>Fax ++41 1 632 12 15
>
>mailto:pflugshaupt@geobot.umnw.ethz.ch
>privat:pflugshaupt@mails.ch
>http://www.geobot.umnw.ethz.ch
>
>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
.-.->r-devel 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-devel-request@stat.math.ethz.ch
>_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
._._>
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._