Tutorial (from the start) [Power / Sample Size]

posted by Alyssa – Malaysia, 2020-05-12 06:05 (1885 d 17:17 ago) – Posting: # 21426
Views: 11,578

Hi Helmut,

Yeah, you are right, i din't install powerTOST. :-|

Once i installed and i follow from the the start, i managed to get up to :-

Sample size search
 n     power
36   0.7642
39   0.7950
42   0.8198


Then i continued with the following command but it appeared error:-

> # 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 match.arg(design) : 'arg' must be NULL or a character vector
> 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


May i know what is this error about? Thank you.


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

Complete thread:

UA Flag
Activity
 Admin contact
23,430 posts in 4,931 threads, 1,674 registered users;
44 visitors (0 registered, 44 guests [including 9 identified bots]).
Forum time: 23:22 CEST (Europe/Vienna)

To know that we know what we know,
and to know that we do not know what we do not know,
that is true knowledge.    Nicolaus Copernicus

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