getUpsilons: Compute residual matrix for boosting object

Description Usage Arguments Value Examples

Description

Compute residual matrix for boosting object

Usage

1
2
getUpsilons(mod, otherSelCourse = NULL, last = FALSE, listFun = kronecker,
  returnUpsOnly = TRUE)

Arguments

mod

an object of class mboost.

otherSelCourse

either NULL or numeric. If NULL Upsilon is computed for selected(mod), otherwise for otherSelCourse

last

logical; whether to return only Upsilon for the last selection step. If FALSE, a list of Upsilons for all iterations is returned

listFun

function; used to combine design matrices, which are build with baselearner operators such as %X%.

returnUpsOnly

logical; if FALSE, the hat matrices are also returned.

Value

Returns a list of length mstop(mod)+1 with residual matrices of size length(mod$response).

Examples

1
2
3
4
5
6
7
8
9
if(require("mboost") & require("TH.data")){
data("bodyfat", package = "TH.data")
mod <- mboost(DEXfat ~ bols(waistcirc) + bbs(hipcirc), data = bodyfat)
Ups <- getUpsilons(mod)
# check result
cbind(mod[100]$resid()[1:10],
(Ups[[length(Ups)]]%*%(mod$response-mod$offset))[1:10]
)
}

davidruegamer/iboost documentation built on May 14, 2019, 3:10 a.m.