Tutorial (from the start) [Power / Sample Size]
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 :-
Then i continued with the following command but it appeared error:-
May i know what is this error about? Thank you.
Edit: Code and results BBCoded; see also this post #10. [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:
- Sample size calculation (Pilot study result vs literature) Alyssa 2020-05-04 04:35 [Power / Sample Size]
- Sample size calculation (Pilot study result vs literature) Dr_Dan 2020-05-04 08:46
- Sample size calculation (Pilot study result vs literature) Alyssa 2020-05-04 09:26
- Estimation of CVw and/or CVwR Helmut 2020-05-04 12:07
- Estimation of CVw and/or CVwR ElMaestro 2020-05-04 12:14
- Mea culpa! Helmut 2020-05-04 12:40
- It must be Myco ElMaestro 2020-05-04 13:46
- It is, it is! Helmut 2020-05-04 14:07
- It is.... Alyssa 2020-05-05 05:00
- Tutorial Helmut 2020-05-05 12:45
- Tutorial Alyssa 2020-05-08 06:48
- library d_labes 2020-05-08 11:16
- Tutorial (from the start) Helmut 2020-05-08 13:08
- Tutorial (from the start)Alyssa 2020-05-12 04:05
- Tracking down error Helmut 2020-05-12 11:49
- Tracking down error: stringsAsFactors d_labes 2020-05-13 11:34
- R <4.0.0 Helmut 2020-05-13 12:07
- R <4.0.0 ElMaestro 2020-05-13 14:18
- R <4.0.0? Helmut 2020-05-13 14:21
- PowerTOST’s functions with as.character(design) d_labes 2020-05-13 18:50
- PowerTOST’s functions with as.character(design) Helmut 2020-05-13 18:55
- R <4.0.0 ElMaestro 2020-05-13 14:18
- R <4.0.0 Helmut 2020-05-13 12:07
- Tracking down error Alyssa 2020-05-15 05:08
- All’s well that ends well. Helmut 2020-05-15 10:52
- Tracking down error: stringsAsFactors d_labes 2020-05-13 11:34
- Tracking down error Helmut 2020-05-12 11:49
- Tutorial (from the start)Alyssa 2020-05-12 04:05
- Tutorial Alyssa 2020-05-08 06:48
- Tutorial Helmut 2020-05-05 12:45
- It is.... Alyssa 2020-05-05 05:00
- It is, it is! Helmut 2020-05-04 14:07
- It must be Myco ElMaestro 2020-05-04 13:46
- Mea culpa! Helmut 2020-05-04 12:40
- Estimation of CVw and/or CVwR ElMaestro 2020-05-04 12:14
- Sample size calculation (Pilot study result vs literature) Dr_Dan 2020-05-04 08:46