Skip to content

Commit f030bae

Browse files
author
NightlordTW
committed
Improve output
1 parent 67a95f5 commit f030bae

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

R/SampleSize.R

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,16 @@ sampleSize <- function(mu_list, varcov_list = NA, sigma_list = NA, cor_mat = NA,
501501
stop("Names included in the list_comparator should be coherent with the names in the arm_names vector")
502502
}
503503

504-
param.d <- list(nsim=nsim,power=power,alpha=alpha,dtype=dtype,ctype=ctype,lognorm=lognorm,vareq=vareq,k=k,adjust=adjust,dropout=dropout,list_lequi.tol=list_lequi.tol, list_uequi.tol=list_uequi.tol)
504+
param.d <- list(nsim=nsim,
505+
power=power,
506+
alpha=alpha,
507+
dtype=dtype,
508+
ctype=ctype,
509+
lognorm=lognorm,
510+
vareq=vareq,
511+
k=k,
512+
adjust=adjust,
513+
dropout=dropout,list_lequi.tol=list_lequi.tol, list_uequi.tol=list_uequi.tol)
505514

506515
if(is.na(ncores)) {
507516
ncores <- parallel::detectCores() - 1

R/helper.r

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ print.simss <- function(x, ...) {
2424
message("Sample Size Calculation Results")
2525
cat("-------------------------------------------------------------\n")
2626
cat(paste0("Study Design: ", x$param.d$dtype, " trial targeting ",100*tpower,"% power with a ",100*alpha, "% type-I error.\n"))
27+
cat("Endpoints Tested:\n")
28+
for (i in 1:length(x$param$list_comparator)) {
29+
cat(paste0(" - ", paste(x$param$list_comparator[[i]], collapse = " vs. "), ": ",
30+
paste(x$param$list_y_comparator[[i]], collapse = ", "), "\n")) #AUCinf and Cmax (multiple co-primary endpoints, m = 2)\n"))
31+
}
32+
33+
34+
2735
cat("-------------------------------------------------------------\n")
2836
print(output, row.names = FALSE) # Suppress row numbers
2937
#cat("-------------------------------------------------------------\n")

0 commit comments

Comments
 (0)