[R] GLM with binomial distribution: a bug?

Liaw, Andy andy_liaw at merck.com
Wed Aug 11 22:03:53 CEST 2004


> From: André TavaresCorrêa Dias
> 
> I'm trying to run a factorial model with binomial error 
> distribution on R
> program but I had some problems.  I'm quite sure it is a bug 
> and would like to 
> know if it was alread corrected. The output don't gives me 
> the effects of 
> factors, it mix the names of factors with the names of 
> factor's levels. For 
> instances: specieserythroxylum ('species' is the name of the factor 
> and 'erythroxylum' the name of one of the species used).
> I ran these same data and structure with an ANOVA and it 
> worked well. Could it
> be some kind of bug or am I missing some step?

The latter, I believe.  glm() fits a regression model.  If you have factors,
they enter the model as contrasts.  What you are seeing are the coefficients
for the contrasts.  If you want to see factor effect, use anova() on the glm
object.  Prof. Fox's `car' package on CRAN also has the Anova() function,
which you might find useful.

Please don't confuse your mis-understanding with bugs!

Andy

 
> 
> Thanks and all the best.
> André
> 
> 
> 
> -------------------------------
> André Tavares Corrêa Dias
> Laboratório de Ecologia Vegetal
> Departamento de Ecologia - IB
> Universidade Federal do Rio de Janeiro
> Ilha do Fundão, CCS
> Rio de Janeiro, RJ. Brasil
> CEP 21941-590    CP 68020
> Tel. (21)2562-6377
> 
> 
> 
> 
> 
> -------------------------------
> André Tavares Corrêa Dias
> Laboratório de Ecologia Vegetal
> Departamento de Ecologia - IB
> Universidade Federal do Rio de Janeiro
> Ilha do Fundão, CCS
> Rio de Janeiro, RJ. Brasil
> CEP 21941-590    CP 68020
> Tel. (21)2562-6377
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
>




More information about the R-help mailing list