Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 8890065f95
Fetching contributors…

Cannot retrieve contributors at this time

16 lines (14 sloc) 0.431 kB
SL.mean <- function (Y, X, newX, family, obsWeights, id, ...)
{
meanY <- weighted.mean(Y, w = obsWeights)
pred <- rep.int(meanY, times = nrow(newX))
fit <- list(object = meanY)
out <- list(pred = pred, fit = fit)
class(out$fit) <- c("SL.mean")
return(out)
}
predict.SL.mean <- function (object, newdata, family, X = NULL, Y = NULL, ...)
{
pred <- rep.int(object$object, times = nrow(newdata))
return(pred)
}
Jump to Line
Something went wrong with that request. Please try again.