From rnassar@duke.edu  Sun Jun 25 17:34:15 2000
From: rnassar@duke.edu (rnassar@duke.edu)
Date: Sun, 25 Jun 2000 18:34:15 +0200 (MET DST)
Subject: [Rd] possible bug, anova.glm(), family="gaussian" (PR#579)
Message-ID: <200006251634.SAA09674@pubhealth.ku.dk>

Dear R team,

I don't get what I think I should get when using anova.glm() with
family="gaussian" -- please ignore this and forgive me if this turns out
to be another example of a fundamental misunderstanding on my part (a
highly likely event!) For example: 

S <- as.factor(rep(c(rep("m",2),rep("f",2)),2))
A <- as.factor(c(rep("a",4),rep("b",4)))
y <- c(10,11,13,15,12,11,16,17)

f.glm.1 <- glm(y~A*S)
f.glm.2 <- glm(y~A+S)
anova(f.glm.1,f.glm.2,test="F")

# Analysis of Deviance Table 
#
# Response: y
#
#
#             Resid. Df Resid. Dev Df Deviance     F Pr(>F)
# A + S + A:S         4      3.500                         
# A + S               5      4.625 -1    0.000 0.000      1

#  compared with the same analysis using anova.lm() below:

f.lm.1 <- aov(y~A*S)
f.lm.2 <- aov(y~A+S)
anova(f.lm.1,f.lm.2)

# Analysis of Variance Table
#
# Model 1: y ~ A + S + A:S
# Model 2: y ~ A + S
#   Res.Df Res.Sum Sq Df Sum Sq F value Pr(>F)
# 1      4      3.500                         
# 2      5      4.625 -1 -1.125  1.2857 0.3202


Thank you again for R and best regards,

Rashid Nassar


--please do not edit the information below--

Version:
 platform = i586-pc-linux-gnu
 arch = i586
 os = linux-gnu
 system = i586, linux-gnu
 status = 
 major = 1
 minor = 1.0
 year = 2000
 month = June
 day = 15
 language = R

Search Path:
 .GlobalEnv, package:MASS, Autoloads, package:base


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] possible bug, anova.glm(), family="gaussian" (PR#579)
rnassar@duke.edu