qtree: Build quantile regression trees using tilted absolute value...

Description Usage Value Examples

Description

Ordinary regression trees use the mean squared error loss function. The qtree function uses the tilted absolute value loss function (a specific case is the LAD trees) with the same speed as that of regular trees.

Usage

1
2
3
qtree(formula, data, mindev = 0.01, mincut = 5, minsize = 10, tau = 0.5,
  na.action = na.pass, model = FALSE, x = FALSE, y = TRUE, wts = TRUE,
  ...)

Value

A class outtree

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
set.seed(1)
library('tree')
x1 <- c(2,4,3,7,8)
x1 <- x1 + rnorm(5)
x2 <- c(12,19,17,3,5)
x2 <- x2 + rnorm(5)
y <- c(-3, 2, 0, 1, 12)
y <- y + rnorm(5)
data.simple <- data.frame(x1,x2,y)
mod.data <- qtree(y ~ ., data = data.simple, mindev = 0.01, tau = 0.5, minsize = 2, mincut = 1)

SeoncheolPark/qrandomForest documentation built on May 9, 2019, 8:32 a.m.