Description Usage Arguments Details Examples
Generate boxplot, display summary of number of death, timing, boundary crossing probability, and user requested simulation-level information
1 2 |
d |
data.table "result" generated by simtest function (or a table table that has the same structure as |
y |
vector of the name(s) of the y varaible(s) for the boxplot. e.g. c("hr") |
dg |
number of digits for median of y below the table. NULL will disable the display of the y statistics. |
yt |
y-axis label |
logs |
|
b |
whether to show boundary crossing probability at each analysis. This require xeff and xfut exist in the |
v |
height of graph area and the summary area below. |
plotsim()
takes the result
data table from the return value of the simtest()
function
(or a table table that has the same structure as result
) and generate the boxplot and display summary statistics.
1 2 3 4 5 6 7 8 9 10 11 12 | # Use a gsSurv object as both input for simulation and testing.
# A logrank p-value and HR from cox model is reported.
library(gsDesign)
gs <- gsSurv (k = 3, test.type = 4, alpha = 0.025, beta = 0.05, timing = c( 0.5,0.75 ),
sfu = sfHSD , sfupar = c( -4 ), sfl = sfHSD, sflpar = c( -12 ),
lambdaC = log(2) / 6, hr = 0.65, hr0 = 1, eta = 0.01,
gamma = c( 2.5,5,7.5,10 ), R = c( 2,2,2,6 ) , S = NULL , T = 15 , minfup = 3 , ratio = 1)
sim1 <- nphsim(nsim=1000,d=gs)
test1 <- simtest(x=sim1,anatype='event',method='LR', d=gs)
test1$result
## Not useful, demonstration purpose only
plotsim(test1$result,y=c("hr","pval"),dg=2,yt="Hazard Ratio",b=1,v=c(2,0.8))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.