predict.PRISM {StratifiedMedicine} | R Documentation |
PRISM: Patient Response Identifier for Stratified Medicine (Predictions)
Description
Predictions for PRISM algorithm. Given the training set (Y,A,X) or new test set (Xtest), output ple predictions and identified subgroups with correspond parameter estimates.
Usage
## S3 method for class 'PRISM'
predict(object, newdata = NULL, type = "all", ...)
Arguments
object |
Trained PRISM model. |
newdata |
Data-set to make predictions at (Default=NULL, predictions correspond to training data). |
type |
Type of prediction. Default is "all" (ple, submod, and param predictions). Other options include "ple" (ple predictions), "submod" (submod predictions with associated parameter estimates). |
... |
Any additional parameters, not currently passed through. |
Value
Data-frame with predictions (ple, submod, or both).
Examples
## Load library ##
library(StratifiedMedicine)
##### Examples: Continuous Outcome ###########
dat_ctns = generate_subgrp_data(family="gaussian")
Y = dat_ctns$Y
X = dat_ctns$X
A = dat_ctns$A
# Run Default: filter_glmnet, ple_ranger, lmtree, param_ple #
res0 = PRISM(Y=Y, A=A, X=X)
summary(predict(res0, X)) # all #
summary(predict(res0, X, type="ple"))
summary(predict(res0, X, type="submod"))
[Package StratifiedMedicine version 1.0.5 Index]