bug in glm.fit (PR#395)
holzer@stat.math.ethz.ch
holzer@stat.math.ethz.ch
Wed, 5 Jan 2000 19:08:28 +0100 (MET)
Dear R-team
There seems to be a bug in glm.fit - I got the following error message:
> > > + Error in names<-.default(*tmp*, value = ynames) : names attribute must be the same length as the vector
In addition: Warning messages:
1: fitted probabilities of 0 or 1 occurred in: (if (is.empty.model(mt)) glm.fit.null else glm.fit)(x = X, y = Y,
2: fitted probabilities of 0 or 1 occurred in: (if (is.empty.model(mt)) glm.fit.null else glm.fit)(x = X, y = Y,
3: fitted probabilities of 0 or 1 occurred in: (if (is.empty.model(mt)) glm.fit.null else glm.fit)(x = X, y = Y,
4: fitted probabilities of 0 or 1 occurred in: (if (is.empty.model(mt)) glm.fit.null else glm.fit)(x = X, y = Y,
5: fitted probabilities of 0 or 1 occurred in: (if (is.empty.model(mt)) glm.fit.null else glm.fit)(x = X, y = Y,
6: fitted probabilities of 0 or 1 occurred in: (if (is.empty.model(mt)) glm.fit.null else glm.fit)(x = X, y = Y,
7: Algorithm did not converge in: (if (is.empty.model(mt)) glm.fit.null
else glm.fit)(x = X, y = Y,
> > traceback()
[1] "names<-.default(*tmp*, value = ynames)"
[2] "names<-(*tmp*, value = ynames)"
[3] "(if (is.empty.model(mt)) glm.fit.null else glm.fit)(x = X, y = Y, "
[4] " weights = weights, start = start, offset = offset, family = family, "
[5] " control = control, intercept = attr(mt, \"intercept\") > 0)"
[6] "glm(SKR.ein.aus ~ MWSQUAL + FAC.M1 + FAC.M2 + FAC.A1 + FAC.A2 + "
[7] " MLDR + TAGNR, family = binomial, data = daten[rows, ])"
Debugging glm.fit I found the following: when some elements of the vector
`good' are FALSE then `w' has no more "full" length:
w <- sqrt((weights * mu.eta.val^2)[good]/variance(mu)[good])
which leads to problems close to the end of the function:
names(w) <- ynames
as `ynames' has "full" length.
The same problem is with:
names(fit$effects) <- c(xxnames[seq(fit$rank)], rep("", nobs -
fit$rank))
as `fit$effects' has same length as `w'.
That's all I found out. I hope it helps.
I am sorry for not sending the data but as it is secret it would take some
effort to "disguise" it, so it that's not necessary I would be quite
grateful...
Thanks, Peter
--please do not edit the information below--
Version:
platform = i686-unknown-linux
arch = i686
os = linux
system = i686, linux
status =
major = 0
minor = 90.1
year = 1999
month = December
day = 15
language = R
Search Path:
.GlobalEnv, package:SfS, Autoloads, package:base
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._