Number of cases to achieve the desired power, for specified number of readers J, and specified DBM or ORH analysis method

SsSampleSizeKGivenJ(
  dataset,
  ...,
  J,
  FOM,
  effectSize = NULL,
  method = "OR",
  alpha = 0.05,
  desiredPower = 0.8,
  analysisOption = "RRRC",
  UseDBMHB2004 = FALSE
)

Arguments

dataset

The pilot dataset. If set to NULL then variance components must be supplied.

...

Optional variance components, VarTR, VarTC and VarErr. These are needed if dataset is not supplied.

J

The number of readers in the pivotal study.

FOM

The figure of merit. Not needed if variance components are supplied.

effectSize

The effect size to be used in the pivotal study. Default is NULL. Must be supplied if dataset is set to NULL and variance components are supplied.

method

"OR" (default) or "DBM".

alpha

The significance level of the study, default is 0.05.

desiredPower

The desired statistical power, default is 0.8.

analysisOption

Specifies the random factor(s): "RRRC" (the default), "FRRC", or "RRFC".

UseDBMHB2004

Logical, default is FALSE, if TRUE the 2004 DBM method is used. Otherwise the OR method is used.

Value

A list of two elements:

K

The minimum number of cases K in the pivotal study to just achieve the desired statistical power, calculated for each value of analysisOption.

power

The predicted statistical power.

Details

effectSize = NULL uses the observed effect size in the pilot study. A numeric value over-rides the default value. This argument must be supplied if dataset = NULL and variance components (the optional ... arguments) are supplied.

Note

The procedure is valid for ROC studies only; for FROC studies see online books.

Examples

## the following two should give identical results
SsSampleSizeKGivenJ(dataset02, FOM = "Wilcoxon", effectSize = 0.05, J = 6, method = "DBM")
#>   KRRRC powerRRRC
#> 1   170 0.8016186

a <- UtilDBMVarComp(dataset02, FOM = "Wilcoxon")$VarCom
SsSampleSizeKGivenJ(dataset = NULL, J = 6, effectSize = 0.05, method = "DBM", UseDBMHB2004 = TRUE,
   list(VarTR = a["VarTR",1], 
   VarTC = a["VarTC",1], 
   VarErr = a["VarErr",1]))
#>   KRRRC powerRRRC
#> 1   170 0.8016186

## the following two should give identical results
SsSampleSizeKGivenJ(dataset02, FOM = "Wilcoxon", effectSize = 0.05, J = 6, method = "OR")
#>   KRRRC powerRRRC
#> 1   170 0.8016186

a <- UtilORVarComp(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]))
#>   KRRRC powerRRRC
#> 1   170 0.8016186

# \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")
}
#> # of readers = 6 estimated # of cases = 251, predicted power = 0.801
#> # of readers = 7 estimated # of cases = 211, predicted power = 0.801
#> # of readers = 8 estimated # of cases = 188, predicted power = 0.801
#> # of readers = 9 estimated # of cases = 173, predicted power = 0.801
#> # of readers = 10 estimated # of cases = 163, predicted power = 0.802
# }