View source: R/main_functions.R
predict.rm_reg | R Documentation |
This function predicts the outcome for a RM object model using new data for continuous y
## S4 method for signature 'rm_reg'
predict(object,newdata)
object |
A fitted RM model object of class |
newdata |
A data frame or matrix containing the new data to be predicted. |
Predicted values newdata
object from the Random Machines model.
# Generating a sample for the simulation
library(randomMachines)
sim_data <- sim_reg1(n = 75)
sim_new <- sim_reg1(n = 25)
rm_mod_reg <- randomMachines(y~., train = sim_data)
y_hat <- predict(rm_mod_reg, newdata = sim_new)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.