predict.ple_train {StratifiedMedicine} | R Documentation |
Patient-level Estimates Model: Prediction
Description
Prediction function for the trained patient-level estimate (ple) model.
Usage
## S3 method for class 'ple_train'
predict(object, newdata = NULL, ...)
Arguments
object |
Trained ple model. |
newdata |
Data-set to make predictions at (Default=NULL, predictions correspond to training data). |
... |
Any additional parameters, not currently passed through. |
Value
Data-frame with predictions (depends on trained ple model).
See Also
Examples
library(StratifiedMedicine)
## Continuous ##
dat_ctns = generate_subgrp_data(family="gaussian")
Y = dat_ctns$Y
X = dat_ctns$X
A = dat_ctns$A
mod1 = ple_train(Y=Y, A=A, X=X, Xtest=X, ple="ranger", meta="X-learner")
summary(mod1$mu_train)
res1 = predict(mod1, newdata=X)
summary(res1)
[Package StratifiedMedicine version 1.0.5 Index]