Learn R Programming

bamlss (version 1.0-0)

stabsel: Stability selection.

Description

Performs stability selection based on gradient boosting.

Usage

stabsel(formula, data, family = "gaussian",
  q, B = 100, thr = .9, ...)

## Plot selection frequencies. # S3 method for stabsel plot(x, show = NULL, pal = function(n) gray.colors(n, start = 0.9, end = 0.3), ...)

Arguments

formula

A formula or extended formula.

data
family

A bamlss.family object.

q

An integer specifying how many terms to select in each boosting run.

B

An integer. The boosting is run B times.

thr

Cut-off threshold for selection.

x

A object of class stabsel.

show

Number of terms to be shown.

pal

Color palette for different model terms.

Not used yet in stabsel.

Value

A object of class stabsel.

Examples

Run this code
# NOT RUN {
## Simulate some data.
d <- GAMart()
n <- nrow(d)

## Add some noise variables.
for(i in 4:9)
  d[[paste0("x",i)]] <- rnorm(n)

f <- paste0("~ ", paste("s(x", 1:9, ")", collapse = "+", sep = ""))
f <- paste(f, "+ te(lon,lat)")
f <- eval(parse(text = f))
f <- list(update(f, num ~ .), f)

## Run stability selection.
sel <- stabsel(f, data = d, q = 6, B = 10)
plot(sel)

## Estimate selected model.
b <- bamlss(sel$formula.new, data = d)
plot(b)
# }

Run the code above in your browser using DataLab