set.seed(329)
data <- data.frame(
x1 = rnorm(500),
x2 = rnorm(500),
x3 = rnorm(500)
)
data$y = with(data, expr = x1 + x2 + x3 + 1/2*x1 * x2 + x2 * x3 + rnorm(500))
forest <- orsf(data, y ~ ., n_tree = 5)
orsf_vint(forest)
Run the code above in your browser using DataLab