Our current confint method wraps around the stats:::confint.lm method, but we discovered that the ... arguments provided to stats:::confint.lm aren't passed on to the vcov call within:
confint.lm <- function (object, parm, level = 0.95, ...)
{
cf <- coef(object)
ses <- sqrt(diag(vcov(object)))
pnames <- names(ses)
if (is.matrix(cf))
cf <- setNames(as.vector(cf), pnames)
if (missing(parm))
parm <- pnames
else if (is.numeric(parm))
parm <- pnames[parm]
a <- (1 - level)/2
a <- c(a, 1 - a)
fac <- qt(a, object$df.residual)
pct <- .format_perc(a, 3)
ci <- array(NA_real_, dim = c(length(parm), 2L), dimnames = list(parm,
pct))
ci[] <- cf[parm] + ses[parm] %o% fac
ci
}
This prevents us from providing any vcovDA estimates other than the default model-based HC0 estimate, since we've created a vcov method that wraps around vcovDA and passes on any ... arguments to the vcovDA call. We need to create our own confint.lm method that does pass on the ... arguments. This may only require one change to the original confint.lm:
.confint_lm <- function (object, parm, level = 0.95, ...)
{
cf <- coef(object)
ses <- sqrt(diag(vcov(object, ...)))
...
}
We should figure out some way to track if any of these (confint.lm, expand.model.frame, others?) change in core R so we can update accordingly, and potentially switch on R version.
Our current
confint
method wraps around thestats:::confint.lm
method, but we discovered that the...
arguments provided tostats:::confint.lm
aren't passed on to thevcov
call within:This prevents us from providing any
vcovDA
estimates other than the default model-based HC0 estimate, since we've created avcov
method that wraps aroundvcovDA
and passes on any...
arguments to thevcovDA
call. We need to create our ownconfint.lm
method that does pass on the...
arguments. This may only require one change to the originalconfint.lm
:Then our
confint
method would be: