Sample size matrix for a platform trial with a given number of treatment arms
Source:R/get_ss_matrix.R
get_ss_matrix.Rd
This function computes the matrix with sample sizes per arm and period. It is used in the functions datasim_bin()
and datasim_cont()
.
Arguments
- num_arms
Integer. Number of experimental treatment arms in the trial.
- n_arm
Integer. Sample size per experimental treatment arm.
- d
Integer vector with timings of adding new arms in terms of number of patients recruited to the trial so far. The first entry must be 0, so that the trial starts with at least one experimental treatment arm, and the entries must be non-decreasing. The vector length equals
num_arms
.
Value
Sample size matrix, consisting of the sample size per arm and per period, where the arms are represented in the rows (with the control arm in the first row and the experimental arms coming after ordered by entry time) and the periods are represented in the columns.
Examples
get_ss_matrix(num_arms = 3, n_arm = 100, d = c(0, 100, 250))
#> [,1] [,2] [,3] [,4]
#> [1,] 50 50 50 50
#> [2,] 50 50 NA NA
#> [3,] NA 50 50 NA
#> [4,] NA NA 50 50