plot_npht {gestate} | R Documentation |
Plot output from nph_traj
Description
This function plots the output from nph_traj().
By default, it produces 6 plots:
"KM plot" Kaplan Meier plot for events. This is in patient time.
"Censoring plot" Plot of CDFs for censoring functions. This is in patient time.
"Recruitment plot" Number of patients expected to have been recruited over time. This is in trial time.
"Event plot" Total number of events expected to occur over time. This is in trial time.
"log(HR) plot" Expected log(HR), with expected confidence interval, over time. This is in trial time.
"Power plot" Expected power over time for various methods. This is in trial time.
Plots may be omitted via arguments.
All calculated powers automatically plotted unless specified otherwise.
Usage
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
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")