update.boostrq {boostrq}R Documentation

Update and Re-fit a boostrq model

Description

Update and Re-fit a boostrq model

Usage

## S3 method for class 'boostrq'
update(object, weights, oobweights, risk, ...)

Arguments

object

a boostrq object

weights

(optional) a numeric vector indicating which weights to used in the fitting process (default: all observations are equally weighted, with 1).

oobweights

an additional vector of out-of-bag weights, which is used for the out-of-bag risk.

risk

string indicating how the empirical risk should be computed for each boosting iteration. inbag leads to risks computed for the learning sample (i.e. observations with non-zero weights), oobag to risks based on the out-of-bag (i.e. observations with non-zero oobagweights).

...

additional arguments passed to callies

Value

a re-fitted boostrq model

Examples

boosted.rq <-
boostrq(
 formula = mpg ~ brq(cyl * hp) + brq(am + wt),
 data = mtcars,
 mstop = 200,
 nu = 0.1,
 tau = 0.5
)

update(
boosted.rq,
weights = c(rep(1, 30), 0, 0),
oobweights = c(rep(0, 30), 1,1),
risk = "oobag"
)


[Package boostrq version 1.0.0 Index]