R-beta: Stars again
Prof Brian D Ripley
ripley at stats.ox.ac.uk
Sun Sep 6 20:45:31 CEST 1998
On 5 Sep 1998, Peter Dalgaard BSA wrote:
> Jim Lindsey <jlindsey at alpha.luc.ac.be> writes:
>
> > 3. Then, if we think of interactions, all stars for main effects are
> > meaningless because they cannot be removed without destroying the
> > hierarchy of the model.
>
> True. Well almost. There are actually a couple of cases where it makes
> sense. (y~C+F:C with F a factor and C continuous gives two lines with
> common intercept, e.g.)
That being a sub-model of y ~ C*F ? Yes, that needs fiddling to
appear permissible.
> > Apparently my position is evolving to where I believe that the
> > option should be removed entirely, or implemented as a new function
> > based on changes in deviance.
There is already such a function! I assume that since you mention deviance
you are talking about glm's (although you do not say so: could you PLEASE
TRY to remember to say such things). In any event, this is what drop1 is
methods are supposed to do, and drop1.glm does do in my R implementation.
As the result is of class anova, print.anova will supply stars or not from
the global setting.
Example:
library(MASS)
data(quine)
library(aov) # for now
quine.glm <- glm(Days ~ .^2, poisson, data=quine)
drop1(quine.glm, test="Chisq")
Single term deletions
Model:
Days ~ Eth + Sex + Age + Lrn + Eth:Sex + Eth:Age + Eth:Lrn +
Sex:Age + Sex:Lrn + Age:Lrn
Df Deviance AIC Dev. change Pr(Chi)
<none> 1368.7 1404.7 0.000
Eth:Sex 1 1391.6 1425.6 22.916 1.692e-06
Eth:Age 3 1497.4 1527.4 128.773 < 2.2e-16
Eth:Lrn 1 1374.1 1408.1 5.459 0.019466
Sex:Age 3 1518.2 1548.2 149.568 < 2.2e-16
Sex:Lrn 1 1368.8 1402.8 0.091 0.762758
Age:Lrn 2 1380.3 1412.3 11.611 0.003010
[I've left the stars off, because, Martin, they are one row out:
xr[!is.na(xr)] is not of the right length when there are NAs.]
> (2) Given that we decide that it would be better to use e.g. a display
> that adds joint test statistics for factors and interactions, how many
> *other* packages will break, because they extract information from
> summary() output? (Perhaps not really that many)
None if you do not remove the information that is currently there: summary
methods are supposed (in S) to calculate information for print.summary.xxx
methods to print, and priting can be selective.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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