Open rcorty opened 8 years ago
dglm() should give residuals of the same dimension as lm() and glm(), given the same data and the same specification of NA handling.
x <- c(runif(n = 10), NA) y <- c(NA, rnorm(n = 10, mean = x)) fit1 <- stats::lm(formula = y ~ x, na.action = na.exclude) fit2 <- stats::glm(formula = y ~ x, na.action = na.exclude) fit3 <- dglm::dglm(formula = y ~ x, dformula = ~ x, na.action = na.exclude) resid(object = fit1) resid(object = fit2) resid(object = fit3)
dglm() should give residuals of the same dimension as lm() and glm(), given the same data and the same specification of NA handling.