ssc_propcomp(design = 3L, ratio = 1, alpha = 0.05, power = 0.8, p1 = 0.65, p2 = 0.65, delta = 0.15)

Can you please help with non-inferiority trial sample size calculation with "SampleSize4ClinicalTrials" package?
Is the alpha one-sided or two-sided in the package?
What will be the input for alpha in the following scenarios? 1. One-sided alpha 0.025 and 2. two-sided alpha 0.05

The documentation doesn't specify. View the code for the function with

```
ssc_precomp
```

(without the following `()`

)

or look at it below

```
ssc_precomp <- function (design = c(1L, 2L, 3L, 4L), ratio = 1, alpha = 0.05,
power = 0.8, p1 = NULL, p2 = NULL, delta = NULL)
{
if (!(design %in% 1L:4L))
stop("Unrecognized study design, 1: Test for equility, 2: Superiority trial,\n 3: Non-inferiority trial, 4: Equivalence trial")
if (design == 1L) {
numerator <- (abs(qnorm(alpha/2)) + abs(qnorm(1 - power)))^2 *
(p1 * (1 - p1)/ratio + p2 * (1 - p2))
}
if (design %in% 2L:3L) {
numerator <- (abs(qnorm(alpha)) + abs(qnorm(1 - power)))^2 *
(p1 * (1 - p1)/ratio + p2 * (1 - p2))
}
if (design == 4L) {
numerator <- (abs(qnorm(alpha)) + abs(qnorm((1 - power)/2)))^2 *
(p1 * (1 - p1)/ratio + p2 * (1 - p2))
}
if (design == 1L) {
denom <- (p1 - p2)^2
}
if (design %in% 2L:3L)
denom <- ((p1 - p2) - delta)^2
if (design == 4L)
denom <- (delta - abs(p1 - p2))^2
n4 <- ceiling(numerator/denom)
n3 <- ratio * n4
samplesize <- data.frame(Treatment = n3, Control = n4)
return(samplesize)
}
```

system
Closed
January 24, 2023, 6:45am
3
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.