## the following two should give identical results
SsSampleSizeKGivenJ(dataset02, FOM = "Wilcoxon", effectSize = 0.05, J = 6, method = "DBM")
a <- UtilVarComponentsDBM(dataset02, FOM = "Wilcoxon")$VarCom
SsSampleSizeKGivenJ(dataset = NULL, J = 6, effectSize = 0.05, method = "DBM", LegacyCode = TRUE,
list(VarTR = a["VarTR",1],
VarTC = a["VarTC",1],
VarErr = a["VarErr",1]))
## the following two should give identical results
SsSampleSizeKGivenJ(dataset02, FOM = "Wilcoxon", effectSize = 0.05, J = 6, method = "OR")
a <- UtilORVarComponentsFactorial(dataset02, FOM = "Wilcoxon")$VarCom
KStar <- length(dataset02$ratings$NL[1,1,,1])
SsSampleSizeKGivenJ(dataset = NULL, J = 6, effectSize = 0.05, method = "OR",
list(KStar = KStar,
VarTR = a["VarTR",1],
Cov1 = a["Cov1",1],
Cov2 = a["Cov2",1],
Cov3 = a["Cov3",1],
Var = a["Var",1]))
# \donttest{
for (J in 6:10) {
ret <- SsSampleSizeKGivenJ(dataset02, FOM = "Wilcoxon", J = J, analysisOption = "RRRC")
message("# of readers = ", J, " estimated # of cases = ", ret$K,
", predicted power = ", signif(ret$powerRRRC,3), "\n")
}
# }
Run the code above in your browser using DataLab