quantregRanger: Quantile Regression with Ranger

Description Usage Arguments Author(s) References See Also Examples

View source: R/quantregRanger.R

Description

Creates a quantile regression forest like described in Meinshausen, 2006.

Usage

1
quantregRanger(formula = NULL, data = NULL, params.ranger = NULL)

Arguments

formula

Object of class formula or character describing the model to fit.

data

Training data of class data.frame, matrix or gwaa.data (GenABEL).

params.ranger

List of further parameters that should be passed to ranger. See ranger for possible parameters.

Author(s)

Philipp Probst

References

Meinshausen, Nicolai. "Quantile regression forests." The Journal of Machine Learning Research 7 (2006): 983-999.

See Also

predict.quantregRanger

Examples

1
2
3
4
5
y = rnorm(150)
x = cbind(y + rnorm(150), rnorm(150))
data = data.frame(x,y)
mod = quantregRanger(y ~ ., data = data, params.ranger = list(mtry = 2))
predict(mod, data = data[1:5, ], quantiles = c(0.1, 0.5, 0.9))

Example output

     quantile= 0.1 quantile= 0.5 quantile= 0.9
[1,]    -0.1325679     0.2698606     1.3538334
[2,]    -0.7911816    -0.4831330     0.2794174
[3,]    -1.4658821    -0.3057980     0.2411234
[4,]    -0.5461595     0.3404699     0.6936027
[5,]     1.3676681     1.8264369     2.5183541

quantregRanger documentation built on May 2, 2019, 3:26 a.m.