Learn R Programming

StratifiedMedicine (version 1.0.5)

predict.ple_train: Patient-level Estimates Model: Prediction

Description

Prediction function for the trained patient-level estimate (ple) model.

Usage

# S3 method for 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

PRISM

Examples

Run this code
# NOT RUN {
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)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab