plot_S: Display of Survival Curves per Study Design

Description Usage Arguments Value Examples

View source: R/plot_S.R

Description

This function plots the survival curves per study design

Usage

1
2
3
4
5
6
7
plot_S(
  S = list(S0, S1),
  Tmax = 50,
  leg = list(x = 30, y = 1, txt = c("Control", "Exp. Arm")),
  param = list(xlab = "Survival Time (mo)", ylab = "PFS", main =
    "PFS Survival Curve Per Study Design")
)

Arguments

S

An object containly a list of survival functions to draw

t

A sequence of survival time for the plot (x-axis)

...

Other graphic parameters passed to the plot

Value

Display of the graph

Examples

1
2
3
4
5
6
7
8
HR = 0.65; delay = 6; lambda0 = log(2) / 12; 
h0 = function(t){lambda0}; S0 = function(t){exp(-lambda0 * t)}
Hazard function and survival function for experimental arm
lambda1 = lambda0 * HR
h1 = function(t){lambda1}; S1= function(t){exp(-lambda1 * t)}
F.entry = function(t){(t/18)^1.5*as.numeric(t <= 18) + as.numeric(t > 18)}

plotS(Tmax = 50, S = list(S0, S1), param=list(xlab="Time (mo)", ylab="PFS", main="PFS: HR = 0.65; Design Assumptions"))

phe9480/rgs documentation built on March 1, 2022, 12:26 a.m.