Learn R Programming

boostrq (version 1.0.0)

update.boostrq: Update and Re-fit a boostrq model

Description

Update and Re-fit a boostrq model

Usage

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

Value

a re-fitted boostrq model

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

Examples

Run this code
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"
)

Run the code above in your browser using DataLab