plot_npht: Plot output from nph_traj

Description Usage Arguments Value Author(s) Examples

View source: R/plotting.R

Description

This function plots the output from nph_traj().
By default, it produces 6 plots:

Plots may be omitted via arguments.
All calculated powers automatically plotted unless specified otherwise.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
plot_npht(
  data,
  KM = TRUE,
  censor = TRUE,
  recruitment = TRUE,
  events = TRUE,
  logHR = TRUE,
  power = TRUE,
  include_frontier = TRUE,
  include_RMST = TRUE,
  include_landmark = TRUE,
  alpha1 = 0.025,
  legend_position = c("top_left", "top_right", "bottom_right")
)

Arguments

data

Full output list from nph_traj()

KM

Boolean to include KM plot (Default = TRUE)

censor

Boolean to include censoring plot (Default = TRUE)

recruitment

Boolean to include recruitment plot (Default = TRUE)

events

Boolean to include events plot (Default = TRUE)

logHR

Boolean to include log(HR) plot (Default = TRUE)

power

Boolean to include power plot (Default = TRUE)

include_frontier

Boolean to include frontier power curve in power plot (Default = TRUE)

include_RMST

Boolean to include RMST power curve in power plot if available (Default = TRUE)

include_landmark

Boolean to include landmark power curve in power plot if available (Default = TRUE)

alpha1

One-sided alpha to use for estimation of log(HR) confidence intervals (Default = 0.025)

legend_position

String with any of "top_left","top_right" or "bottom_right", corresponding to legend position in power plot. Default is "top_left".

Value

Returns NULL

Author(s)

James Bell

Examples

1
2
3
4
5
6
7
trial <- nph_traj(Weibull(100,1),Weibull(70,1),rcurve=LinearR(12,100,100),RMST=20,
  landmark=20,max_assessment=30)

plot_npht(trial)
plot_npht(data=trial,KM=FALSE,censor=FALSE,recruitment=FALSE)
plot_npht(data=trial,KM=FALSE,censor=FALSE,recruitment=FALSE,events=FALSE,logHR=FALSE,
include_frontier=FALSE, include_RMST=FALSE,include_landmark=FALSE,legend_position="top_right")

gestate documentation built on Feb. 20, 2020, 5:08 p.m.