Description Usage Arguments Value Author(s) Examples

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.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 |

`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". |

Returns NULL

James Bell

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")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.