PowerTOST [Power / Sample Size]
❝ response in R console : > utils:::menuInstallLocal()
❝ package ‘PowerTOST’ successfully unpacked and MD5 sums checked
OK, so you ended up as shown there (example for
Power2Stage
).❝ Even after this step i am not able to attach power tost to the library.
Package ≠ library. Not sure what you mean, can you explain?
❝ After this step i can able to do further.
OK.
❝ Please suggest.
Copy one of the examples of my previous post and paste it to the console. If you want to go for the FDA’s method, just a one-liner because
theta0 = 0.975
, design = "2x2x4"
, and targetpower = 0.8
are defaults of the function. Hence, you have to specify only the CV
:sampleN.NTID(CV = 0.1)
+++++++++++ FDA method for NTIDs ++++++++++++
Sample size estimation
---------------------------------------------
Study design: 2x2x4 (TRTR|RTRT)
log-transformed data (multiplicative model)
1e+05 studies for each step simulated.
alpha = 0.05, target power = 0.8
CVw(T) = 0.1, CVw(R) = 0.1
True ratio = 0.975
ABE limits = 0.8 ... 1.25
Implied scABEL = 0.9002 ... 1.1108
Regulatory settings: FDA
- Regulatory const. = 1.053605
- 'CVcap' = 0.2142
Sample size search
n power
14 0.717480
16 0.788690
18 0.841790
Since this is a four-period design, you may want to increase the sample size to compensate for a potential loss in power due to dropouts.
balance <- function(n, n.seq) {
# Round up to obtain balanced sequences
return(as.integer(n.seq * (n %/% n.seq + as.logical(n %% n.seq))))
}
nadj <- function(n, do.rate, n.seq) {
# Round up to compensate for anticipated dropout-rate
return(as.integer(balance(n / (1 - do.rate), n.seq)))
}
CV <- 0.1 # Assumed CV
do.rate <- 0.15 # Anticipated dropout-rate 15%
n <- sampleN.NTID(CV = CV, print = FALSE, details = FALSE)[["Sample size"]]
dosed <- nadj(n, do.rate, 2) # Adjust the sample size
df <- data.frame(dosed = dosed, eligible = dosed:(n - 2))
for (j in 1:nrow(df)) {
df$dropouts[j] <- sprintf("%.1f%%", 100 * (1 - df$eligible[j] / df$dosed[j]))
df$power[j] <- suppressMessages( # We know that some are unbalanced
power.NTID(CV = CV, n = df$eligible[j]))
}
print(df, row.names = FALSE)
dosed eligible dropouts power
22 22 0.0% 0.91017
22 21 4.5% 0.89602
22 20 9.1% 0.88031
22 19 13.6% 0.86072
22 18 18.2% 0.84179
22 17 22.7% 0.81658
22 16 27.3% 0.78869
If you are confused, see there.
Dif-tor heh smusma 🖖🏼 Довге життя Україна!
Helmut Schütz
The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
Complete thread:
- Estimation of sample size for NIT using ISCV By R pharm07 2022-05-03 11:23 [Power / Sample Size]
- Estimation of sample size for NTI using ISCV By R dshah 2022-05-03 13:04
- PowerTOST Helmut 2022-05-03 14:38
- PowerTOST pharm07 2022-05-04 08:08
- PowerTOSTHelmut 2022-05-04 10:33
- PowerTOST pharm07 2022-05-04 14:54
- PowerTOST pharm07 2022-05-11 05:30
- PowerTOST: sampleN.NTID() Helmut 2022-05-11 13:19
- PowerTOST: sampleN.NTID() pharm07 2022-05-18 05:18
- sampleN.NTID(): Example Helmut 2022-05-18 14:30
- sampleN.NTID(): Example pharm07 2022-05-19 05:36
- sampleN.NTID(): Example Helmut 2022-05-18 14:30
- PowerTOST: sampleN.NTID() pharm07 2022-05-18 05:18
- PowerTOST: sampleN.NTID() Helmut 2022-05-11 13:19
- PowerTOST pharm07 2022-05-11 05:30
- PowerTOST pharm07 2022-05-04 14:54
- PowerTOSTHelmut 2022-05-04 10:33
- PowerTOST pharm07 2022-05-04 08:08