Report on glm error (was Re: Re: Re: [R] sm library)

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Dec 20 11:08:01 CET 2000


Please use a meaningful subject: it helps enormously in searching over the
archives, and this one was totally misleading.

On Wed, 20 Dec 2000, Oscar wrote:

> If you could please try this code:
> 
> Y<-cbind(V2,V3)
> X<-log(V1)
> model1<-glm(Y~X,family=binomial(link=cloglog))
> plot(X,model1$fitted.values,ylim=c(0,1))
> points(X,V2/V3,col=2)
> 
> With data
> 
> 1 6 23
> 2 9 24
> 4 20 25
> 8 24 24
> 16 21 22
> 1 1 23
> 2 14 25
> 4 17 24
> 8 21 23
> 16 24 24
> 1 11 24
> 2 14 24
> 4 20 26
> 8 19 23
> 16 22 23
> 1 4 23
> 2 9 21
> 4 15 24
> 8 23 23
> 16 24 24
> 1 7 23
> 2 16 26
> 4 23 25
> 8 17 18
> 16 25 25
> 1 5 22
> 2 8 24
> 4 23 25
> 8 23 23
> 16 26 26
> 
> It doesn't produce the right adjust.

It does seem to be correct: I think you should be plotting against
V2/(V2+V3) or have Y <- cbind(V2, V3-V2).  The columns are the number of
successes and number of failures (see ?glm).

It helps to know what you intended, i.e. what you think the right
answer is, when you send in a bug report.

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