Skip to content
Prev 15750 / 63461 Next

predict.glm(..., type="response") loses names (was RE: [R] A sugg estion for predict function(s))

[You'd want names() rather than row.names(), since predict() 
in this case returns a vector.]
 
I don't know if this is intended (and if it is, I don't 
understand why):  the names are missing only for 
type="response".  For the other types, the names are 
there.  The problem seems to be the order of arguments
in pmin() inside make.link():

            eta <- pmin(thresh, pmax(eta, -thresh))

which should probably be:

            eta <- pmin(pmax(eta, -thresh), thresh)

This is because pmin/pmax preserve the names of it's first 
argument, not the second.

There are quite a few other places in make.link() like
this.  Question to R Core:  Would such fixes be considered
`trivial' enough to make it into R-2.1.0?

Andy