Esta função tem dois métodos associados a ela: Function.areg.boot e Function.transcan. Agora é só pedir pra ver o código fonte do método que te interessa:
> Function.areg.boot
function (object, type = c("list", "individual"), ytype = c("transformed",
"inverse"), prefix = ".", suffix = "", pos = -1, ...)
{
type <- match.arg(type)
ytype <- match.arg(ytype)
if (missing(type) && !(missing(prefix) & missing(suffix) &
missing(pos)))
type <- "individual"
fit <- object$fit
k <- length(fit)
nam <- names(fit)
g <- vector("list", k)
xtype <- object$xtype
typey <- object$ytype
catl <- object$cat.levels
names(g) <- nam
for (i in 1:k) {
typ <- if (i == 1)
typey
else xtype[i - 1]
if (typ == "c") {
if (i == 1 && ytype == "inverse")
stop("currently does not handle ytype=\\"inverse\\" when y is categorical")
h <- function(x, trantab) {
if (is.factor(x))
x <- as.character(x)
trantab[x]
}
w <- fit[[i]]$y
names(w) <- catl[[nam[i]]]
formals(h) <- list(x = numeric(0), trantab = w)
}
else {
h <- function(x, trantab) {
res <- rep(NA, length(x))
res[s] <- approxExtrap(trantab, xout = x[s])$y
res
}
fiti <- fit[[i]]
formals(h) <- list(x = numeric(0), trantab = if (i ==
1 && ytype == "transformed") list(x = fiti[[2]],
y = fiti[[1]]) else fiti)
}
g[[i]] <- h
}
if (type == "list")
return(g)
fun.name <- paste(prefix, nam, suffix, sep = "")
for (i in 1:k) assign(
fun.name[i], g[[i]], pos = pos)
}
<environment: namespace:Hmisc>