plot_ple: Patient-Level Estimate Plot (plot_ple): Visualize...

View source: R/plot_ple.R

plot_pleR Documentation

Patient-Level Estimate Plot (plot_ple): Visualize distribution of estimates

Description

Plots based on Patient-level estimate (see ple_train) model results. Options include "waterfall" and "density". Target controls which column of "mu_train" (from ple_train object) is shown on the plot.

Usage

plot_ple(object, target = NULL, type = "waterfall", ...)

Arguments

object

ple_train object

target

Which patient-level estimate to visualize. Default=NULL, which uses the estimated treatment difference.

type

TYpe of plot. Default="waterfall"; type="density" shows density plot.

...

Additional arguments (currently ignored).

Value

Plot (ggplot2) object

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")
plot_ple(mod1)



StratifiedMedicine documentation built on March 30, 2022, 1:06 a.m.