predict.PRISM: PRISM: Patient Response Identifier for Stratified Medicine...

Description Usage Arguments Value Examples

View source: R/PRISM.R

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

1
2
## 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## 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, X) ) # all #
summary( predict(res0, X, type="ple") )
summary( predict(res0, X, type="submod") )

StratifiedMedicine documentation built on Dec. 12, 2019, 9:07 a.m.