[Rd] predict.glm(..., type="response") dropping names (and a propsed (PR#7792)

From: <andy_liaw_at_merck.com>
Date: Thu 14 Apr 2005 - 14:17:36 GMT


Here's a patch that should make predict.glm(..., type="response") retain the names. The change passes make check on our Opteron running SLES9. One simple test is:

names(predict(glm(y ~ x, family=binomial,

                  data=data.frame(y=c(1, 0, 1, 0), x=c(1, 1, 0, 0))),
              newdata=data.frame(x=c(0, 0.5, 1)), type="response"))

which gives

[1] "1" "2" "3"

with this patch, and "NULL" with the current R-beta.

I only use glm() once in a blue moon, so others may want to test other cases.

Best,
Andy


R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri Apr 15 00:22:21 2005

This archive was generated by hypermail 2.1.8 : Mon 24 Oct 2005 - 22:26:39 GMT