Tutorial [Power / Sample Size]

posted by Alyssa – Malaysia, 2020-05-08 08:48 (1442 d 11:01 ago) – Posting: # 21406
Views: 7,491

Dear Helmut,

Thanks for the detailed tutorial!

I was trying to follow your command and out in the powerTOST, however, i cant get the sample size estimation. May i know what has gone wrong? Thank you ~


# partial replicate, 3- and 4-period full replicate designs
> designs <- c("2x3x3", "2x2x3", "2x2x4")
> # desired powers
> target  <- c(0.80, 0.85, 0.90)
> # assign a data.frame of results
> res     <- data.frame(design = rep(designs, each = length(target)),
+                       target = target, n = NA, power = NA)
> # loop over the rows, apply the defaults:
> # T/R-ratio 0.90, 100,000 simulated studies
> for (j in 1:nrow(res)) {
+   res[j, 3:4] <- sampleN.scABEL(CV = CV, design = res$design[j],
+                                 targetpower = res$target[j],
+                                 print = FALSE, details = FALSE)[8:9] + }
Error in sampleN.scABEL(CV = CV, design = res$design[j], targetpower = res$target[j],  :
  could not find function "sampleN.scABEL"
> print(res, row.names = FALSE)
 design target  n power
  2x3x3   0.80 NA    NA
  2x3x3   0.85 NA    NA
  2x3x3   0.90 NA    NA
  2x2x3   0.80 NA    NA
  2x2x3   0.85 NA    NA
  2x2x3   0.90 NA    NA
  2x2x4   0.80 NA    NA
  2x2x4   0.85 NA    NA
  2x2x4   0.90 NA    NA



Edit: Code and results BBCoded; see also this post #10[Helmut]

Complete thread:

UA Flag
Activity
 Admin contact
22,988 posts in 4,825 threads, 1,661 registered users;
106 visitors (1 registered, 105 guests [including 6 identified bots]).
Forum time: 19:49 CEST (Europe/Vienna)

The only way to comprehend what mathematicians mean by Infinity
is to contemplate the extent of human stupidity.    Voltaire

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5