Learn R Programming

StratifiedMedicine (version 0.1.3)

predict.PRISM: 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 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

Run this code
# NOT RUN {
## 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, submod_lmtree, param_ple #
res0 = PRISM(Y=Y, A=A, X=X)
summary( predict(res0) ) # all #
summary( predict(res0, type="ple") )
summary( predict(res0, type="submod") )


# }

Run the code above in your browser using DataLab