Katarzyna Kulma <katarzyna.kulma <at> gmail.com> writes:

> 
> Hiya,
> 
> I'm using simple glm binomial models to test the effect of treatment
> (factor, 3 levels) on infection prevalence (infected/uninfected):
> 
> ad3<-glm(Infection~ecs, family=binomial, data=eilb)
> 
> but summary() function returns for each of the factor-level coefficients
> against the control treatment:
> 
> > summary(ad3)
> 
> 
> What I want to know is whether the treatment in general had an effect on
> infection prevalence, not the difference between respective factor levels.
> If it was a general linear model I could switch between using lm() and
> aov() functions, but how can I proceed here? I sense I'm missing something
> obvious, so I'll appreciate your help!
> 


  either

ad3B <- update(ad3,.~1)
anova(ad3,ad3B)

or

drop1(ad3,test="Chisq")

should do what you want (a likelihood ratio test between the model
containing the treatment and the model without the treatment).

Bonus, the likelihood ratio tests will be more accurate than
the Wald tests provided by summary().

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to