search for: isglm

Displaying 3 results from an estimated 3 matches for "isglm".

Did you mean: imglm
2004 Mar 03
1
Bug in plot.lm (PR#6640)
...t;- length(r) yh <- predict(x) # != fitted() for glm if (any(show[2:4])) { s <- if(inherits(x, "rlm")) x$s else sqrt(deviance(x)/df.residual(x)) hii <- lm.influence(x, do.coef=FALSE)$hat } if (any(show[2:3])) { ylab23 <- if(isGlm) "Std. deviance resid." else "Standardized residuals" - w <- weights(x) # r.w := weighted.residuals(x): ! r.w <- if(is.null(w)) r else (sqrt(w)*r)[w!=0] rs <- r.w/(s * sqrt(1 - hii)) } if (any(show[c(1,3)])) --- 16,38 ----...
2005 Apr 23
3
Enhanced version of plot.lm()
...als(x)), cex.id = 0.75, cook.levels=c(0.5, 1.0), label.pos=c(4,2)) { if (!inherits(x, "lm")) stop("Use only with 'lm' objects") if (!is.numeric(which) || any(which < 1) || any(which > 5)) stop("`which' must be in 1:5") isGlm <- inherits(x, "glm") show <- rep(FALSE, 5) show[which] <- TRUE r <- residuals(x) yh <- predict(x) w <- weights(x) if (!is.null(w)) { wind <- w != 0 r <- r[wind] yh <- yh[wind] w <- w[wind] labels.id <- labels.id[...
2008 May 09
0
Incorrect fix for PR#9316: Cook's Distance & plot.lm
...nd the values given by cooks.distance(x) -- as shown in plot.lm(x, which = 4) -- for glms: http://bugs.r-project.org/cgi-bin/R/Analyses-fixed?id=9316;user=guest;selectid=9316 The suggested fix was to modify the contour levels by a dispersion factor, implemented as follows: dispersion <- if (isGlm) summary(x)$dispersion else 1 cl.h <- sqrt(crit * p * (1 - hh)/hh * dispersion) [1] where crit is the value of Cook's distance along the contour, p is the number of parameters and hh is a vector of hat values. It is clear that in the case of a normal linear model, the cl.h values...