rf: rf models

Description Usage Arguments See Also Examples

View source: R/rf.R

Description

rf is a method used to fit random forest models using the randomForest package.

Usage

1
rf(Y, X, ntree = 500, mtry, Ylabel = NULL)

Arguments

Y

numerical vector of size n containing the response to predict.

X

numerical matrix of dimension n by p regressors

Ylabel

a character value containing the name of the Y varaible

See Also

predict.rf

Examples

1
2
3
4
5
6
library(mfe)
data(indicateurs)
X <- indicateurs[, -c(1,2,3)]
Y <- indicateurs[,1]
model <- rf(X = X, Y = Y, Ylabel = colnames(indicateurs)[1])
predict(model, newdata = indicateurs[1,])

alex-conanec/OptFilBov documentation built on May 21, 2019, 9:46 a.m.