[R] GLM questions

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Mon May 13 11:15:46 CEST 2002


On 13 May 2002, Ernesto Jardim wrote:

> Hi
>
>
> I'm doing a glm analysis and I have two doubts (at least :)
>
> 1) When I run the function it gives a lot of warnings (see below) what
> they mean ? (may be I'm ignorant about this analysis ...)
>
> glm.poisson<-glm(log(Jkij+1)~fac.ano+fac.tri+fac.icesr+fac.mat+fac.ano:fac.icesr+fac.ano:fac.tri,family=poisson())

For a Possion model the response should be the counts, not log(counts+1).
You get a log link as default.

>
> warnings()
>
> 40: non-integer x = 1.252763
> 41: non-integer x = 1.864785
> 42: non-integer x = 2.140066
> 43: non-integer x = 2.944439
> 44: non-integer x = 1.252763
> 45: non-integer x = 3.139439
> 46: non-integer x = 2.772589
> 47: non-integer x = 1.945910
> 48: non-integer x = 2.505526
> 49: non-integer x = 3.157000
> 50: non-integer x = 3.828641
>
> 2) How can I save/dump/... the summary(glm.poisson) in a text file to
> print ? I've tried
>
> > write.table(summary(glm.poisson),"glm.poisson")
> Error in as.data.frame.default(x[[i]], optional = TRUE) :
>         can't coerce summary.glm into a data.frame
>
> and it doesn't work.

Use sink.

>
> Regards and thanks
>
> EJ
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

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