predict.SDTree {SDModels} | R Documentation |
Predictions for the SDTree
Description
Predicts the response for new data using a fitted SDTree.
Usage
## S3 method for class 'SDTree'
predict(object, newdata, ...)
Arguments
object |
Fitted object of class |
newdata |
New test data of class |
... |
Further arguments passed to or from other methods. |
Value
A vector of predictions for the new data.
Author(s)
Markus Ulmer
See Also
Examples
set.seed(1)
n <- 10
X <- matrix(rnorm(n * 5), nrow = n)
y <- sign(X[, 1]) * 3 + rnorm(n)
model <- SDTree(x = X, y = y, Q_type = 'no_deconfounding', cp = 0.5)
predict(model, newdata = data.frame(X))
[Package SDModels version 1.0.13 Index]